The iPhone's settings application is build around a UITableview. In some views there are additional texts between cells. For example in "Settings" -> "General" -> "Network" there is the text
"Using 3G loads data faster, but may descrease battery life" under a cell with an UISwitch. Any ideas how to implement this?
Images of what I mean can be found here:
http://www.tipb.com/2008/07/12/how-to-disable-3g-on-the-iphone-3g-for-more-talk-but-less-speed/
If you have a grouped table view, the tableView:titleForFooterInSection: method found in the UITableViewDataSource protocol and the UITableViewController class handles this for you:
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section {
if (section == 0) {
return @"Footer text for first section, goes below cells in that group.";
}
return nil;
}
To place that text between cells, you have to have multiple sections and tell your tableView:cellForRowAtIndexPath: method to place cells that you want beneath that text in the next section.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With