TableView不会将setEditing消息发送到单元格 [英] TableView won't send setEditing message to cells

查看:53
本文介绍了TableView不会将setEditing消息发送到单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我有一个UITableView,它可以正常运行并且全部运行.

So far I have a UITableView, it works properly and all.

我的问题是进入编辑"模式时,显然所有单元格都没有改变,并且仅当我将单元格从表格视图中拖出时才显示红色符号(删除控件)(这意味着iphone重新加载了该单元格再次出现,就是在这里它检测到该单元格已被标记"为正在编辑).

My problem is when going into "editing" mode, apparently the cells are not changing at all, and the red sign (delete control) only shows up when I drag the cell out of the tableview (meaning the iphone reloads the cell again, and it is here when it detects that the cell was "flagged" as editing).

当我选择编辑"按钮时,问题就解决了,红色控件应该出现,但没有显示出来.

The problem is right when I select "edit" button, red controls should show up but they don't.

我确实实现了tableview的委托方法来返回编辑类型控件(插入ot删除),但是没有运气.

I did implement the tableview's delegate method for returning a editing type control ( either an insert ot deletion) and no luck.

推荐答案

您当然可以使用UIViewController.

Of course you can use a UIViewController.

setEditing:animate 方法中,只需调用

[super setEditing:editing animated:animate];
[self.myTableView setEditing:editing animated:animate];

您将获得那些漂亮的小图标;)

and you will get those nice little icons ;)

这篇关于TableView不会将setEditing消息发送到单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆