I’m wondering if it’s possible in general to create a ViewController that is a subclass of UITableViewController but instead of having the UITableView take up the entire view, to load it from a xib… so when creating it you’d click “UITableViewController” and “use Xib for interface”.
I ask this because I’d like to do the following two items.
- more easily implement iAds. In the example for iAds, there is an IBOutlet pointing to a view in th viewController called “contentView”, and it seems like it would be simple to add a generic view on th UITableViewController XIB, and move the table onto that view co you have contentView–>tableView, and then hook up the IBOutlet for contentView to that newly added view.
That way the table would resize when I resize the view it lives on.
- Rather than subclassing UITableViewController, I’d like to actually subclass “PullRefreshViewController” [github.com/leah/PullToRefresh]
I’ve tried quite a few combinations of initialization strategies such as
- creating a custom initializer which calls initWithStyle
- not calling initWithStyle at all, but calling “- (void) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;”
The problem ends up being that the view always loads with the table taking up the full screen regardless of what I do in the Xib.
I’d like to avoid using a UIViewController on which I put a TableView and implement the two delegate protocols because I’d like to use the above “pulltorefresh” which itself is built on a UITableViewController…
I think I’m missing some basic thing here… anyone else tried to do this?