I need to create a grouped tableview Controller some thing similar to this image
I have identified that this tableview has 2 segments, so i added 2 segments and 2 rows each for each segment.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if(section == 0) return 2;
else return 2;
}
1.) The problem i have is, how to add the Label on top of the 1st segment of the tableview.
I have to add 2 buttons in between the 2 Groups (tableviews), i know how to add one button, but how do you add 2 ?
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
if (section == 0) {
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button setTitle:@"Hello" forState:UIControlStateNormal];
// How to add the 2nd button ?
return button;
}
return nil;
}
3.) When i added the group table view with 2 segments, i didn't get the round edges in the cells, how do i get that ?
4.) I need to have the edit feature (so i could delete records) ONLY for the 2nd segment. So when i click on the edit button, i should be able to delete records only on the 2nd segment. Is this possible ? if so how do i do this ?