开发者

UINavigationController and IBOutlet

开发者 https://www.devze.com 2023-02-23 04:03 出处:网络
I created a UInavigation controller in my xib file.The UINavigation controller is the top level control.I don\'t need a parent view.Later on I will manually add the UINavigation controller to the wind

I created a UInavigation controller in my xib file. The UINavigation controller is the top level control. I don't need a parent view. Later on I will manually add the UINavigation controller to the window.

What is the best way to instant开发者_StackOverflow中文版iate the UINavigationController? I can't seem to figure out how to do this.


If you do not need to do anything special in the .xib file it is way easier to do this programmatically by adding the following code to your app delegate:

UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:myView]; //myView is a view you previously created
[self.window addSubview:nav.view];
0

精彩评论

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