iphone - UITableView 中的编辑模式

标签 iphone objective-c iphone-sdk-3.0 uitableview

所以我已经实现了

- (BOOL)tableView:(UITableView *)tableView
canEditRowAtIndexPath:(NSIndexPath *)indexPath

- (void)tableView:(UITableView *)tableView
commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath

但是我将如何触发一些东西来将 tableview 切换到编辑模式?就像您单击编辑时 iphone 中的消息一样,会出现删除图标。这听起来可能很基本,但我对此一无所知,而且有点紧急,任何线索都将不胜感激,谢谢。

最佳答案

[tableView setEditing:YES animated:YES];

关于iphone - UITableView 中的编辑模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4633392/

相关文章:

iphone - iPhone 版 MGTwitterEngine 教程

iOS 8 : UITableViewCell detail text not correctly updating

objective-c - 为什么 Xcode 4 不会因异常而中断?

ios - 使用 show - Beginner 通过 Storyboard导航到另一个 View

objective-c - 如何从模拟器中的核心位置获得所需的精度?

ios - 降低 iPod 音量以播放应用声音(如原生 SMS 应用)

iphone - 如何将所有字典存储在数组中

iphone - 是否可以创建自定义的动画 MKAnnotationView?

Plist 文件中的 iPhone UIColor

iPhone 和 iPad - 可以在 Xcode 上更改产品名称吗?