开发者

iphone programming ?. Change UITableViewCellEditingStyle image?

I just need to know is it pos开发者_如何学JAVAsible to change UITableViewCellEditingStyle image ?. If possible please tell me How to do that?


I don't see any delegate methods for changing the editing-style view.

You could change the editing button title with the delegate method -tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:, however.

You could also override UITableViewCell and create a custom cell with UITableViewCellEditingStyleNone and a custom editing style behavior and appearance.


In case you're still interested you can actually get this to work by intercepting willTransitionToState and didTransitionToState in a subclass of UITableViewCell. The solution does involve "hacking" around in the cell view hierarchy. Look for the description of recursiveDescription on UIView on how to "dump" a hierarchy, but you will find a UIImageView of which you can change the .image property...

Fairly ugly hack, but does not actually use any private api.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜