Reputation: 193
So I have to work on this really big project, it's still on objective C.
I was just ask to make a really small change (hide a button) so I did that and it's building fine and everything looks normal but then all of the tableView in the project won't react as in didSelectRowAtIndexPath is never called (scrolling work and the data are correctly displayed)
The only thing that changed compared to before is that I used xCode 9.
Now when I build it using xCode 8 it's working again so at least we can go ahead but I still am wondering what is happening.
I made a smaller project using exactly the same logic as the main project (the cell are custom, you can swipe etc) and when I did it from scratch, it's working fine.
So I fell like it's more of an xCode bug/error than one with the code. would someone have any idea ?
Upvotes: 0
Views: 332
Reputation:
Have you used tap anywhere on that UI?? because when tap: UITapGestureRecognizer is there in UI didselect work after only at longpress of cell
or you can just set in your viewdidload function
UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard)];
[self.tableView addGestureRecognizer:gestureRecognizer];
gestureRecognizer.cancelsTouchesInView = NO;
Upvotes: 1
Reputation: 117
Please check the following
It should be interaction enabled
And check you have created any button on top of all layers which is targeting some other action.
Check it and reply.
Upvotes: 0