Reputation: 6353
I have a custom UITableViewCell in my UITableView of an objective c application. I had a imageView on the left and a label, but now I want add a check in the right position. I have this check added in accessory view into my custom cell, but I have the didSelectRow function too.
How can I disable the didSelectRow in the region of accesoryView? Is it possible?
Upvotes: 3
Views: 242
Reputation: 1708
Though the OP probably has their answer long since, for posterity: this UITableViewDelegate method: tableView(_:accessoryButtonTappedForRowWith:) exists to resolve this issue/mmet this need.
Cheers!
Upvotes: 1
Reputation: 5945
You can add UIButton
on right side with size you want. In your cell create delegate protocol, VC should implement it and set self as delegate.
Upvotes: 0
Reputation: 535
You can also make Custom button for your check button. set button click and delegate if you need to perform anything out of your cell class. so when you tap on button you will get button click on that region and if you click on outer space of button you will get did select of tableview.
Upvotes: 0