我不确定现在问这个问题是否合适。我正在表视图上使用 Xcode 5(预览版)。现在的问题是我的表格视图是否被选择为group
比我在第一个单元格和表格顶部边缘之间有间隙。
合适的视图委托的代码如下
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 8;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *simpleTableIdentifier = @"SimpleTableItem";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
}
cell.textLabel.text = [NSString stringWithFormat:@"cell %d",indexPath.row];
return cell;
}
下图是我选择时的样子group
在西伯利亚
但是,如果我要切换到plain
,表正常
对于这种情况有什么想法。我用谷歌搜索了一下,但似乎什么也没有。欢迎任何帮助。
这是 iOS 7 中分组表格视图的预期外观。如果您打开“设置”应用程序,您将在表格顶部以及表格视图中每个部分之间看到类似的分隔栏(灰色)。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)