【发布时间】:2014-03-06 14:12:23
【问题描述】:
我的 UITableView 出现了非常奇怪的错误。我正在使用标准视图和部分。
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 44.0f;
}
- (NSString*) tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
switch (section)
{
case kSectionProfile:
return @"Profile";
break;
case kSectionContacts:
return @"Contacts";
break;
case kSectionApps:
return @"Apps";
break;
case kSectionSettings:
return @"Settings";
break;
case kSectionCount:
return nil;
break;
}
return nil;
}
TableView 来自 XIB。
模拟器:
这是 UITableView 的顶部,部分永远不会触及可见区域的顶部,并且单元格是围绕部分标题绘制的。 我不知道是什么导致了这个奇怪的问题。 UITableView 的顶部似乎没有正确计算。
【问题讨论】:
标签: ios objective-c uitableview