I am reloading the particular tableview’s section on NSTimer which i scheduled on the 0.05 seconds. I have a button in that section cell But once timer starts, I am not able to get button click event.
Kindly help me:)
Thanks In Advance
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.
The reason you cannot press the button is because you are constantly reloading the tableView, so the button gets reinitialized while you are pressing it.
There are two solutions (one is better for you, but without seeing your code I cannot tell which).
Solution A: Instead of calling reloadData on the tableview, only update the labels in the cells.
Solution B: Reuse your UITableViewCells and only initialize the button when needed, not on every reloadData.