2012-03-13 61 views
0

我在Xcode 4.3.1中制作了一个新的应用程序,并且我使用了一个UITableView,我有一个自定义外观。基本上我有1个图像,几乎占据了整个320像素。所以当我执行编辑(重新排列单元格)时,苹果默认会将所有内容向右移动50像素左右。我希望那里没有任何运动。只需在右侧显示小线条,以便拖动单元格。我不允许删除或插入,所以我有我的风格总是设置为UITableViewCellEditingStyleNone,但在编辑模式下,这留下了一个小图标将在左边的空间,但再次,我想那里没有空间在左边和只是拖动右侧的线条。有任何想法吗?我可以让XCode UITableViewCellEditingStyle不偏移吗?

这里是一些示例代码:

// 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; 
} 

回答

1
+0

辉煌。有时苹果非常明显,有时非常神秘。在这种情况下,很明显,如果你知道去哪里看。谢谢。感叹号也有帮助。 ;) – 2012-03-13 19:02:31