UITableViewController, with table view not the root of its nib?
UITableViewController, with table view not the root of its nib?
- Subject: UITableViewController, with table view not the root of its nib?
- From: Jens Alfke <email@hidden>
- Date: Wed, 03 Aug 2011 13:49:10 -0700
I’ve got an iOS screen that incorporates a UITableView. This screen is run by a UIViewController subclass. I’d like to subclass UITableViewController instead, to get more table behaviors for free. The problem I’m running into is that the table view is not the root view of my nib. (There’s a text field above the table that’s a sibling of it.)
As far as I can tell, UITableViewController only works when the table is the root of the nib. It does have a separate ‘tableView’ property, but this isn’t an IBOutlet so there’s no way to wire it up to the table view in the nib. Instead, the class assumes that the ‘view’ outlet — which must point to the nib’s root view — is the table view, and raises an assertion failure otherwise.
I’m trying to figure out a way around this, but every workaround I think of makes the project more complicated, canceling out the benefit of switching to UITableViewController. Is there a clean way of doing it that I’m missing?
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden