UITableView编辑模式中的减号按钮

时间:2012-08-16 04:01:20

标签: ios cocoa-touch 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

1 个答案:

答案 0 :(得分:2)

此行将在行

中显示“ - ”
- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath
{
    return NO;
}