1

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.

enter image description here

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?

Stonz2
  • 6,306
  • 4
  • 44
  • 64
  • Check this:: http://stackoverflow.com/questions/36932069/unable-to-use-uitabbarcontroller-with-sliding-side-menu/36932163#36932163 – Mr. Bond Apr 29 '16 at 12:27
  • Yes...i tried it but it did not work. Can you please provide a sample project? –  Apr 29 '16 at 12:28

1 Answers1

1

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];           
Ashish Kakkad
  • 23,586
  • 12
  • 103
  • 136
Nishant Gupta
  • 457
  • 3
  • 16