0

after upgrading to iOS 9 (worked fine in iOS 8), I am having trouble clicking UIBUttons and editing UITextFields inside custom UITableViewCells.

I have an UITableView with custom UITableViewCells. These cells are loaded like this:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ... controller=[[PresetRowViewController alloc] initWithNibName:@"PresetRowViewController" bundle:nil]; ... return (UITableViewCell *)controller.view; }

The cells show fine, but I cannot click in any UIButton or edit any UITextField inside them.

Any ideas?

Thanks

user1750371
  • 113
  • 5

3 Answers3

0

Try checking for gesture recognizers (ie. view.gestureRecognizers = nil;) for various views (the button, cell itself). Also make sure button.userInteractionEnabled = YES; and cell.userInteractionEnabled = YES; Finally, make sure there's no invisible views overtop of the button/cell.

Elliot Alderson
  • 546
  • 2
  • 17
0

Try to bring the subviews in the customized table view cell to the front.

user3068613
  • 123
  • 2
  • 9
0

I had this same issue. Apple changed how UITableViewCells work in iOS 9. It was fixed for me by dragging in a new UITableViewCell into the Xib and moving everything over. See: https://stackoverflow.com/a/32826526/101923

Community
  • 1
  • 1
Tim Swast
  • 14,091
  • 4
  • 38
  • 61