【发布时间】:2012-03-29 23:59:13
【问题描述】:
我正在 Xcode 4.3.1 中制作一个新应用程序,我正在使用一个 UITableView,其中我有一个自定义外观。基本上我有一张图像几乎占据了整个 320 像素。因此,当我实现编辑(重新排列单元格)时,苹果默认将所有内容向右推 50 像素左右。我希望没有任何运动。只需在右侧显示小线,以便您可以拖动单元格。我不允许删除或插入,所以我的样式始终设置为 UITableViewCellEditingStyleNone,但是在编辑模式下,这会留下一个空间,其中一个小图标将再次出现在左侧,但我希望左侧没有空间并且只是右边的线用于拖动。有什么想法吗?
这里是一些示例代码:
// The editing style for a row is the kind of button displayed to the left of the cell when in editing mode.
- (UITableViewCellEditingStyle)tableView:(UITableView *)aTableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
// No editing style if not editing or the index path is nil.
if (self.editing == NO || !indexPath)
return UITableViewCellEditingStyleNone;
return UITableViewCellEditingStyleNone;
}
【问题讨论】:
标签: iphone xcode uitableview cell