在我的 iPhone 应用程序中,我有一个处于编辑模式的 UITableView,其中包含自定义 UITableViewCell。 我想检测用户何时在“删除”按钮出现之前单击了每个单元格的左按钮(减去圆形红色按钮,旋转动画按钮)。
在这种情况下,我希望能够更改我的单元格内容...
这可能吗?
谢谢!
最佳答案
您可以将实现 -willTransitionToState:
和/或 -didTransitionToState:
方法的 UITableViewCell
子类化。
willTransitionToState: Subclasses of UITableViewCell can implement this method to animate additional changes to a cell when it is changing state. UITableViewCell calls this method whenever a cell transitions between states, such as from a normal state (the default) to editing mode. The custom cell can set up and position any new views that appear with the new state. The cell then receives a layoutSubviews message (UIView) in which it can position these new views in their final locations for the new state. Subclasses must always call super when overriding this method.
关于iphone - UITableView : detecting click on '-' button in edit mode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2448583/