I am using the JTRevealSidebar and built a table view controller with static cells to use as my slide out navigation. When I put the navigation controller as the the start view I see all my table cells as they’re supposed to be. When I use that view as the slide out view for my navigation it’s an empty table view. This is the code I’m using to set it as the side bar and display it.
//This is in the header file
@property (nonatomic, strong) ehrxSideBarController *leftSidebarViewController;
//Then in the implementation file
@synthesize leftSidebarViewController = _leftSidebarViewController;
- (UIView *)viewForLeftSidebar {
CGRect viewFrame = self.navigationController.applicationViewFrame;
UITableViewController *controller = self.leftSidebarViewController;
if ( ! controller) {
self.leftSidebarViewController = [[ehrxSideBarController alloc] init];
self.leftSidebarViewController.sidebarDelegate = self;
controller = self.leftSidebarViewController;
controller.title = @"LeftSidebarViewController";
}
controller.view.frame = CGRectMake(0, viewFrame.origin.y, 270, viewFrame.size.height);
controller.view.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleHeight;
return controller.view;
}
I made sure in my storyboard the view has the correct controller class associated with it.
Well, judging by the lack on any response even with a bounty I’m guessing this is to obscure or no one has tried it. I ended up dynamically creating the sections and cells in code rather than using static cells.