When you tap a row in a UITableView, the row is highlighted and selected. Is it possible to disable this so tapping a row does nothing?
When you tap a row in a UITableView , the row is highlighted and
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All you have to do is set the selection style on the
UITableViewCellinstance using either:Objective-C:
or
Swift 2:
Swift 3 and 4.x:
Further, make sure you either don’t implement
-tableView:didSelectRowAtIndexPath:in your table view delegate or explicitly exclude the cells you want to have no action if you do implement it.More info here and here