indexPath.row returns null in tableView didSelectRowAtIndexPath:indexPath
I thought it was supposed to return the row selected.
When i look at indexPath in the debugger it (corectly) returns: “2 indexes [0, 0]”
Am I missing something?
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.
Well
nullis0. Therowproperty is typeint— perhaps you’re mistakenly using it as an object or pointer.You mention that you want the actual “row” that was selected. If you mean you want the cell that was selected, here’s how:
Note that if you somehow programmatically select a row that’s not currently visible, this will return
nil.