2012-03-13 60 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