开发者

iphone programming ?. Change UITableViewCellEditingStyle image?

开发者 https://www.devze.com 2023-01-09 18:51 出处:网络
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-

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

精彩评论

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