Skip to content

Instantly share code, notes, and snippets.

@tanb
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanb/e0d155ffba2258b34d81 to your computer and use it in GitHub Desktop.
Save tanb/e0d155ffba2258b34d81 to your computer and use it in GitHub Desktop.
+ (void)initialize
{
_singleton = @[@"hoge",
@(100),
[UIImage new]];
}
+ (id)getSettingsAtIndex:(NSUInteger)index
{
NSArray *settings = [[NSArray alloc] initWithArray:_singleton copyItems:YES];
return settings[index];
}
+ (NSArray *)getSettings
{
return [[NSArray alloc] initWithArray:_singleton copyItems:YES];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment