Reputation: 211
i am trying to know the best way to add custom buttons in UITableViewCell if we have a lot of data to show. I know about cell.button.tag = indexPath.row
method to get the indexPath of button, but if there's much more data in the tableViewCell
things get messed up using tag
if i set the title to be changed when tapped some other cell's button title also changes automatically.. I've been finding a solution from 2-3 weeks.. Help me out here please. Thanks for your time. A nice tutorial or explanation would do best. Because I'am a beginner..
Upvotes: 1
Views: 1272
Reputation: 301
This is likely too late to help you, but in case someone else needs to be pointed in the right direction:
This tutorial has a quick rundown on implementing buttons in custom table view cells using the delegate method. Good luck!
Quick edit: The accepted answer here does a good job of explaining it clearly as well.
Upvotes: 4