2

I've setup the Facebook SDK in my iOS app. I'm trying to figure out how to make my app open to a storyboard view after logging in. Here's the piece of my AppDelegate.m that controls this. Right now, the app is set to open a ViewController xib file after successful login. How can I alter this code so that the app opens to a Storyboard view upon successful login?

AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.



    self.mainViewController = [[SSViewController alloc]
                               initWithNibName:@"SSViewController" bundle:nil];
    self.navController = [[UINavigationController alloc]
                          initWithRootViewController:self.mainViewController];
    self.window.rootViewController = self.navController;
    [self.window makeKeyAndVisible];



    if (FBSession.activeSession.state == FBSessionStateCreatedTokenLoaded) {

        // Yes, so just open the session (this won't display any UX).
        [[FBSession activeSession] closeAndClearTokenInformation];

    } else {
        // No, display the login page.
        [self showLoginView];

    }

        return YES;

}
0

0

Browse other questions tagged or ask your own question.