1

I'm trying to load a uitableview using ECSlidingViewController methods.

When I call this code:

UIStoryboard*  sb = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone"
                                              bundle:nil];
UITableViewController* page = [sb instantiateViewControllerWithIdentifier:@"tableViewPage"];

CGRect frame = self.slidingViewController.topViewController.view.frame;
self.slidingViewController.topViewController = page;
self.slidingViewController.topViewController.view.frame = frame;
[self.slidingViewController resetTopView];

while "tableViewPage" is a tableView Controller, not a view with a table. It gives me:

[UITableViewController loadView] loaded the "Bzc-w8-vsI-view-gnu-XH-Eb0" nib but didn't get a UITableView.'

I tried to made a method like topViewController just for uitableviewcontroller instead of uiviewcontroller ... but I failed. What did I miss?

LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114
Mohamed Emad Hegab
  • 2,665
  • 6
  • 39
  • 64

1 Answers1

9

I think it's trying to tell you that you have a UITableViewController in your storyboard but the top-level view associated with that controller is not a UITableView.

Phillip Mills
  • 30,888
  • 4
  • 42
  • 57
  • @Julia as far as i know you must have a `UITableView` as the top-level view (if you are subclassing your class with `UITableViewCntroller`. If you want to use a UIView as the top level you should subclass with `UIViewController` and add `` to your subclassed `.h` file – Saad Masood Mar 01 '14 at 15:34
  • 3
    so can you tell me what do you using swift @SaadMasood – kareem Dec 30 '14 at 01:17