Can I use swipe to delete as swipe to do some other action using titleForDeleteConfirmationButtonForRowAtIndexPath?
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 ;-)
精彩评论