Application windows are expected to have a root view controller at the end of application launch

前端 未结 2 623
一整个雨季
一整个雨季 2020-12-12 00:11

I am using the facebook iOS SDK setup tutorial: https://developers.facebook.com/docs/mobile/ios/build/

After Step 4: Adding Log Out to your App,

I get a bla

相关标签:
2条回答
  • 2020-12-12 00:41

    Check that you have the following line in your application delegate's application:didFinishLaunchingWithOptions: method:

    self.window.rootViewController = self.viewController;
    
    0 讨论(0)
  • 2020-12-12 01:01

    Make sure you set your window.rootviewcontroller = your _navigationviewcontroller. Like this: (this all happens in your AppDelegate.cs file)

    public partial class AppDelegate : UIApplicationDelegate { // class-level declarations UIWindow _window; UINavigationController _navigationcontroller;

        //
        // This method is invoked when the application has loaded and is ready to run. In this 
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
    
        public override bool FinishedLaunching (UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            _window = new UIWindow (UIScreen.MainScreen.Bounds);
    
            // If you have defined a view, add it here:
            // window.AddSubview (navigationController.View);
            _navigationcontroller = new UINavigationController();
            _navigationcontroller.PushViewController(new SplashViewController(),false);
            **_window.RootViewController = _navigationcontroller;**
    
            // make the window visible
    
    
    
        _window.MakeKeyAndVisible ();
    
            return true;
        }
    }
    

    }

    0 讨论(0)
提交回复
热议问题