Programmatically set the initial view controller using Storyboards

前端 未结 22 2269
感情败类
感情败类 2020-11-22 15:00

How do I programmatically set the InitialViewController for a Storyboard? I want to open my storyboard to a different view depending on some condition which may

22条回答
  •  眼角桃花
    2020-11-22 15:12

    Found simple solution - no need to remove "initial view controller check" from storyboard and editing project Info tab and use makeKeyAndVisible, just place

    self.window.rootViewController = rootVC;
    

    in

    - (BOOL) application:didFinishLaunchingWithOptions:
    

提交回复
热议问题