Take the 2-minute tour ×

So I am trying to install this Navigation Framework in my app:



Now, if you look at the attached image, I have my login screen. Once the login is done, I do a Segue Modal push into my "home" page and in there, I want to start having the FRLayeredNavigationController once I reach my homepage. Is that possible while using the storyboard? According to the Youtube Video, one would usually use the FRLayeredNavigationController by doing:

        // Override point for customization after application launch.

        HomeViewController* homeController = [[HomeViewController alloc] init];
        FRLayeredNavigationController* lnc = [[FRLayeredNavigationController alloc] initWithRootViewController:homeController];

        self.window.rootViewController = lnc;

   [self.layeredNavigationController pushViewController:vc inFrontof:self maximumWidth:NO animated:YES];

enter image description here

share|improve this question

1 Answer 1

I have not fount a way to do this using Segue's... But the way I have accomplish this is as follows:

Providing the login was successful and you are wanting to move onto the next part of you app, then the following is how you would transition:

- (void)loginSucceeded
    UIViewController * vc = (UIViewController*)[self.storyboard instantiateViewControllerWithIdentifier:@"someIdentifier"];
    FRLayeredNavigationController * nav = [[FRLayeredNavigationController alloc] initWithRootViewController:vc configuration:^(FRLayeredNavigationItem *item) {
        item.width = 300;
        item.nextItemDistance = 90;
    [self presentViewController:nav animated:YES completion:nil];

You will need to set the Storyboard ID to that specified in the above methos. This can be found in the 'Identity Inspector' tab when viewing the storyboard and selecting the ViewController you have designed.

Also you will no longer need to perform the segue you had previously created, so delete that.

Any future view controllers you want to 'push' onto the screen, you simply need to call the following:

UIViewController * vc = (UIViewController*)[self.storyboard instantiateViewControllerWithIdentifier:@"SomeStoryboardIDHere"];
[self.layeredNavigationController pushViewController:vc inFrontOf:self maximumWidth:YES animated:NO];
share|improve this answer

Your Answer


