UITableView tableView indentationLevelForRowAtIndexPath
- (NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath
Parameters of [UITableView tableView indentationLevelForRowAtIndexPath]
tableView
The table-view object requesting this information.
indexPath
An index path locating the row in tableView.
Return Value of [UITableView tableView indentationLevelForRowAtIndexPath]
Returns the depth of the specified row to show its hierarchical position in the section.
UITableView tableView indentationLevelForRowAtIndexPath example.
- (NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath{
NSInteger theLevel=0;
if ( indexPath.row==1) {
theLevel=5;
}
return theLevel;
}
NSInteger theLevel=0;
if ( indexPath.row==1) {
theLevel=5;
}
return theLevel;
}
Example of [UITableView tableView indentationLevelForRowAtIndexPath].
- (NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath {
if(tableView.editing == YES){
return 1; // or higher integer
} else {
return 0;
}
}
if(tableView.editing == YES){
return 1; // or higher integer
} else {
return 0;
}
}
UITableView tableView indentationLevelForRowAtIndexPath example.
- (NSInteger)tableView:(UITableView *)tableView
indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath {
return [indexPath row] % 2;
}
indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath {
return [indexPath row] % 2;
}