John-Lluch / SWRevealViewController

A UIViewController subclass for presenting side view controllers inspired on the FaceBook and Wunderlist apps, done right !
Other
4.52k stars 989 forks source link

SWReveal + UITabBarController - going to initial scene #259

Closed gorevoy closed 10 years ago

gorevoy commented 10 years ago

Hello guys. I created such SWReveal scheme in storyboard contain:

Also i have some UIViewControllers, which i call such way:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
UIViewController *controller = nil;

if(indexPath.row == 0) // Here UIViewController - works like a charm
{
        controller = [storyboard instantiateViewControllerWithIdentifier:@"Dashboard"];
}
/* more VCs */
else if(indexPath.row == 5) // Here UITabBarController - here's issue
{
        controller = [storyboard instantiateViewControllerWithIdentifier:@"TabBar"];
}
[self.revealViewController pushFrontViewController:controller animated:YES];

UITabBarController have for instance 2 child UIViewControllers. I have such issue, when i call UITabBarController, it opens as needed, but when i assign custom class for one of UITabBarController children UIViewControllers it loads UITabBarController class (i see in logs) then push initial scene like i just launched app again (in this case - Dashboard), but not first tab's VC.

Additional info: I don't use UINavigationController, but i tried to add UINavCtrlr and attach UITBCtrlr to it - the same issue.

Thank you for your help.

gorevoy commented 10 years ago

Sorry guys. My inner issue. Started project from the beginning and issue disappeared.