tra*_*uan 15 objective-c uitableview ios ios7 xcode5
我不确定现在问这个问题是否合适.我在表视图上使用Xcode 5(预览版).现在的问题是,如果我的表视图被选中,那么group我在第一个单元格和表格的上边缘之间存在间隙.
适用于uitable视图委托的代码如下
- (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;
}
Run Code Online (Sandbox Code Playgroud)
当我选择groupxib 时,下面的图片

但是,如果我切换到plain,表是正常的

对这种情况有任何想法.我用Google搜索,但似乎没有任何东西.欢迎任何帮助.
Jak*_*cer 19
这是iOS 7中分组表视图的预期外观.如果打开"设置"应用程序,您将在表格顶部和表格视图中的每个部分之间看到类似的分隔栏(灰色).
| 归档时间: |
|
| 查看次数: |
10559 次 |
| 最近记录: |