Company logo with the letters 'NotTooBad Software' TextSmith Blog

Another way to create Settings views

iPhone Development  

Craig Hockenberry has also created an API for Settings views. But unlike mySettings his API creates the views from code instead of plists. Like this:

- (void)constructTableGroups
{
NSMutableArray *cells = [NSMutableArray array];
IFTextCellController *textCell = [[[IFTextCellController alloc] initWithLabel:@"Text" andPlaceholder:@"Placeholder" atKey:@"sampleText" inModel:model] autorelease];
[cells addObject:textCell];
IFSwitchCellController *switchCell = [[[IFSwitchCellController alloc] initWithLabel:@"Switch" atKey:@”sampleSwitch” inModel:model] autorelease];
[cells addObject:switchCell];
tableGroups = [[NSArray arrayWithObject:cells] retain];
}

Check it out at http://furbo.org/2009/04/30/matt-gallagher-deserves-a-medal/ .

Suggest changes to post.

Comments

Want to hear about new posts?