CEWendel / SWTableViewCell

An easy-to-use UITableViewCell subclass that implements a swippable content view which exposes utility buttons (similar to iOS 7 Mail Application)
MIT License
7.13k stars 1.27k forks source link

How to get "indexPath"? #400

Closed giuseppebruno closed 8 years ago

giuseppebruno commented 8 years ago

How to get indexPath when calling func swipeableTableViewCell(cell: SWTableViewCell!, didTriggerRightUtilityButtonWithIndex index: Int) in Swift?

vinczebalazs commented 8 years ago

You can use

[NSIndexPath indexPathWithIndex:index]

infinZero commented 7 years ago

How can I access same(indexPath) in Objective-C? whereas I've already tried following.

 NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
   NSLog(@"selected favourite button tag %ld",(long)indexPath);

whereas in simulator it gives me same result each time.

selected favourite button tag 0

Any solution to get button "setTag" property to access index path of the row for that utility buttons are being pressed just like in normal tableview