В этом коде есть неправильный отступ.
Здесь правый отступы:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
/*
UIView *backView = [[UIView alloc] initWithFrame:CGRectZero];
backView.backgroundColor = [UIColor clearColor];
cell.backgroundView = backView;
[backView release];
*/
static NSString *cellIdentifier1 = @"DetailCellStyle1";
static NSString *cellIdentifier2 = @"DetailCellStyle2";
if (indexPath.section == 0) {
// Load from nib
DetailCellViewController *cell = (DetailCellViewController *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier1];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle]
loadNibNamed:@"DetailCellView"
owner:nil
options:nil];
for (id currentObject in topLevelObjects) {
if ([currentObject isKindOfClass:[UITableViewCell class]]) {
cell = (DetailCellViewController *) currentObject;
break;
}
}
}
return cell;
}
else {
// Load from nib
DetailCellViewController2 *cell = (DetailCellViewController2 *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier2];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle]
loadNibNamed:@"DetailCellView"
owner:nil
options:nil];
for (id currentObject in topLevelObjects) {
if ([currentObject isKindOfClass:[UITableViewCell class]]) {
cell = (DetailCellViewController2 *) currentObject;
break;
}
}
}
return cell;
}
return nil;
}
Там есть еще, что return cell
;