Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableView didSelectRowAtIndexPath: not being called on first tap

I'm having an issue with UITableView's didSelectRowAtIndexPath.

My table is setup so that when I select row it initializes a new view controller and pushes it.

The first time I tap any row in the table, the method does not get called. Once I select another row, it begins to work as normal.

I have verified this by setting a breakpoint on didSelectRowAtIndexPath. When adding an NSLog to the method I see that when I select the second row that finally pushes the new view controller, I see two log statements appear in the console at the same time.

Any suggestions?

like image 902
Mark Adams Avatar asked Jan 21 '10 01:01

Mark Adams


2 Answers

Any chance you accidentally typed didDeselectRowAtIndexPath?

like image 78
Ole Begemann Avatar answered Oct 13 '22 21:10

Ole Begemann


Also check the selection property of your table view in xib file. Use 'Single Selection' or 'Multiple Selection' as required.

like image 40
includeMe Avatar answered Oct 13 '22 23:10

includeMe