【发布时间】:2014-12-24 20:56:25
【问题描述】:
我的项目基于故事板和我放置 UITableView 和 UIViewTableViewCell(样式右细节)的视图之一。
在 Xcode 中一切看起来都不错,但是当我在模拟器或设备上启动应用程序时,表格单元格看起来太宽了。
您对这种奇怪行为的原因有什么建议吗?我应该改变什么才能让单元格完全可见?
编辑:
我正在附加 cellforRowAtIndexPath:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"MyTableCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
【问题讨论】:
-
它和 iPhone4 一样吗?
-
你能把 cellForRowAtIndexPath 的代码贴出来吗?
-
@ZeMoon 我已经编辑了主要问题。
-
标题在哪里设置?此外,似乎还有另一个带有“De...”文本的标签出现。您在哪里以及如何设置此标签?
-
之前我放错了屏幕(现在更新了)。我使用默认样式“正确详细信息”,而不将自定义文本设置为标题或详细信息。如您所见,详细信息不在屏幕上,这是我的主要问题。
标签: xcode uitableview storyboard xcode6