iosuitableviewcontainer-view

Selections not working with TableViewController in Container View


I'm developing a storyboard based app, and trying to get a UITableViewController within a Container view working. It's set up pretty basically, with a container view in my main view, which is linked to my TableViewController with an embed segue (i.e. all done in Interface Builder).

My problem is that I can't select rows within the table view. I've implemented tableView:didSelectRowAtIndexPath:, and when I rewire the table view as a standalone view, it works just fine. I can scroll the table view fine, so presumably the touch events aren't being stolen by some other part of the view. Is there anything special I need to be doing here, or I might be overlooking?


Solution

  • It turns out that the problem was a gesture recognizer left over from a previous iteration of the prototype. I had disconnected the action, but not the connection to the gestureRecognizer collection for the associated view.