How can I receive TouchesBegan from a UITableViewCell in a UITableViewController so I can know when the user touches some cell?
How can I receive TouchesBegan from a UITableViewCell in a UITableViewController so I can
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.
When you touch the a cell, it becomes highlighted; try overriding
setHighlighted:in a subclass ofUITableViewCellto adjust your appearance when it changes to YES (user touching) or NO (user lifted off).(Overriding
touchesBegan:withEvent:will also work, but it’s easier to usesetHighlighted:in order to capture when you’re not longer touching; otherwise you need to overridetouchesEnded:withEvent:andtouchesCancelled:withEvent:).