Reputation:
I am trying to integrate UITabBarController
with Sliding menu. I'm using SWRevealViewController
to create the sliding menu.
Following is the picture of my story board.
But the TabView
is visible only for news. I want it to be like a new view just as android. In android we can combine both Navigation Drawer and TabPager
.
How can I do so in iOS?
Upvotes: 1
Views: 199
Reputation: 457
Try as follows :
MainTabViewController *frontViewController = [[MainTabViewController alloc] init];
RearViewController *rearViewController = [[RearViewController alloc] init];
UINavigationController *frontNavigationController = [[UINavigationController alloc] initWithRootViewController:frontViewController];
UINavigationController *rearNavigationController = [[UINavigationController alloc] initWithRootViewController:rearViewController];
SWRevealViewController *revealController = [[SWRevealViewController alloc] initWithRearViewController:rearNavigationController frontViewController:frontNavigationController];
revealController.delegate = self;
self.viewController = revealController;
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
Upvotes: 1