Monday, September 2, 2013

Setting up a UINavigationController

UINavigationController

appdelegate.cs

public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
    window = new UIWindow (UIScreen.MainScreen.Bounds);
    
    UINavigationController rootViewController = new UINavigationController ();

    SomeOtherViewController mainVC = new SomeOtherViewController ();

    rootViewController.PushViewController (
mainVC, false);

    window.RootViewController = rootViewController;
            
    window.MakeKeyAndVisible ();
            
    return true;
}

  • Use PushViewController to show a new screen.



No comments:

Post a Comment