开发者

Can I use swipe to delete as swipe to do some other action using titleForDeleteConfirmationButtonForRowAtIndexPath?

开发者 https://www.devze.com 2023-03-26 05:22 出处:网络
In my iOS app I\'d like to implement swipe to \"add this item to a watch开发者_运维问答list\" sort of action.

In my iOS app I'd like to implement swipe to "add this item to a watch开发者_运维问答list" sort of action.

Using titleForDeleteConfirmationButtonForRowAtIndexPath it's possible to change "Delete" to some other title.

I'm wondering if Apple would allow such handling.


I've done this before, and its OK for the App Store.

You may simply add an UISwipeGestureRecognizer to every cell in the UITableView Delegate: cellForRowAtIndex, and set the direction property as left/right. Then add your own button subview to the cell, and just pop it out when a swipe gesture is being detected.

BTW, Apple is using this trick in the 'iPod' app on iOS 5.0 to show the music detail pop-up view ;-)

0

精彩评论

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