2012-08-16 80 views
2

當我將UITableView設置爲編輯模式時,「 - 」按鈕出現在表格行之外。我如何讓他們出現在行內(即白色區域內)。UITableView編輯模式中的減號按鈕

Example of Current Behavior - Minus appears outside of grouped cells.

我正在尋找能在內置的應用程序,如在iPhone天氣應用程序的背面中發現的行爲(其中位置可以被添加和刪除。)

Example of Desired Behavior - iOS Weather; Minus appears in grouped cells. http://what-when-how.com/wp-content/uploads/2011/08/tmp5D87_thumb.jpg

+0

它默認顯示 – 2012-08-16 04:27:08

+0

行外好嗎你出隊'UITableViewCell'在你的表中使用?使用標準單元格樣式,您的內容應該縮進以爲刪除按鈕設置路線,但它應該出現在單元格內。 – 2012-08-16 04:44:16

+0

對於分組表格視圖樣式,這實際上是合適的。如果您需要不同的佈局,請使用普通樣式。 – gcbrueckmann 2012-08-16 08:15:20

回答

2

這條線將顯示「 - 」行內

- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    return NO; 
} 
相關問題