ios - How to get the swipped cell index path in didTriggerRightUtilityButtonWithIndex delegate? -


i have done uitableview cell swipe according tutorial

http://www.appcoda.com/swipeable-uitableviewcell-tutorial/

now want indexpath of partcular cell swipped inside delegate

- (void)swipeabletableviewcell:(swtableviewcell *)cell didtriggerrightutilitybuttonwithindex:(nsinteger)index 

how can indexpath of swipped cell. please me. thanks

you can create instance of table view binding outlet storyboard .h file,

@interface swipetableviewcontroller : uitableviewcontroller <swtableviewcelldelegate>     @property (strong, nonatomic) iboutlet uitableview *yourtableview;  @end 

in same method , can nsindexpath of cell instance of method.

- (void)swipeabletableviewcell:(swtableviewcell *)cell didtriggerleftutilitybuttonwithindex:(nsinteger)index {     nsindexpath *indexpath = [self.yourtableview indexpathforcell:cell];     nslog(@"%i",indexpath.row);     .... } 

hope you.


Comments