There are numerous posts out there stating one should avoid the use of UITableViewController. More and more I want to give in, but I'm using a CoreDataTableViewController super class that's tied into the entire application, and I don't have the time to rewrite it all.
Of course, the UITableViewController's view shouldn't take up the entire screen (iPad project), so I put it as a subview on a regular UIView instance with the frame set to a pretty size. That's when weird things start to happen.
I copied my custom class (GroupsTableViewController->CoreDataTableViewController->UITableViewController) from a test-project where everything was working fine, to my current project. I then alloc/init and addSubview the view.
At first the table would show up empty. What gives? The viewWillAppear: message is not sent. What the...? Alright, then I call it manually (at this point, I'm already starting to doubt myself). Next, the table is actually filled with content, but all interactivity is gone. No taps, no scrolling.
I tried setting userInteractionEnabled on everything, but no result. This is a n00b thing, I'm sure, too silly to be stuck on. Yet here I am, stuck.
Can anyone point me to the right direction? Did I forget a delegate somewhere? Or maybe an unsent message?
One issue you are running into is that nested UIViewControllers do not receive the proper events such as viewWillAppear:. According to apple's guidelines an UIViewController should fill the entire screen and not represent a partial view (of course with the exceptions of the UITabBarController, UINavigationController, and UISplitViewController). Try setting the GroupsTableViewController as the main controller (if it is in an UINavigationController try pushing it, if its a split view make it the details view, etc). If that works then there a some events not getting through causing your problems. Hope that helps!