I would like to recreate the iOS settings menu. To do so I need to understand how this is created. Please find an example here below:
My understanding is that this is a masterdetailview controller style project with at the left a table view and at the right a detail view with custom cells.
I found this answer to recreate the grouping but have no idea yet on how to create the custom actions.
To add a custom UITableViewCell you should have a UITableView in your ViewController.
Then you can add Custom UITableViewCell by Adding a new file to the project.
Now you can see 3 files are added to the project. Go to the XIB file & modify it as you want. Finally Go to the
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath method & add these lines in it.
static NSString *MyIdentifier = @"MyIdentifier"; //Set Identifier for cell
CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier: MyIdentifier]; //init CustomCell
if (cell == nil) { //Check cell is nill or not
NSArray *nib;
nib = [[NSBundle mainBundle] loadNibNamed:@"CustomCell"
owner:self options:nil]; //if cell is nil add CustomCell Xib
for (id oneObject in nib) if ([oneObject isKindOfClass:[CustomCell class]])
cell = (CustomCell *)oneObject;
}
//Set Cell Values Here
return cell;