开发者

Adding view before RootViewController

开发者 https://www.devze.com 2023-04-02 05:34 出处:网络
I started my application as a navigation based application, and did the main开发者_如何学Go bulk of the work using the tables etc. Now, I wish to create a start view page, consisting of two buttons, o

I started my application as a navigation based application, and did the main开发者_如何学Go bulk of the work using the tables etc. Now, I wish to create a start view page, consisting of two buttons, one which links to the RootViewController and the other which links to another view.

Is this possible? If so, how would I go about it? Thanks!


Make a new UINavigationController with your startview as the rootViewController for the window first.

Then on the click event of the first button, make a delegate call to your appDelegate class and remove the present UINavigationController and add the main UINavigationController (which links to your RootViewController) as the rootViewController for the window.

For the second buttons click event you can simply push the next view to the navigationController.

0

精彩评论

暂无评论...
验证码 换一张
取 消