开发者

Xcode 4: Switch Views to MainWindow.xib

开发者 https://www.devze.com 2023-03-31 10:16 出处:网络
I\'m pretty new to Objective-C and Xcode, so it would be really helpful if you could give a detailed answer. I\'m working with a Navigation-Based Application and I have a menu. If the user clicks on a

I'm pretty new to Objective-C and Xcode, so it would be really helpful if you could give a detailed answer. I'm working with a Navigation-Based Application and I have a menu. If the user clicks on a specific button, the tableview and the navigation bar should load up. But I don't have a clue on how I could load up the "MainView.xib". I can load the "RootViewController", but this only 开发者_JAVA技巧shows the tableview and not the navigation bar.

Thanks in advance!


MainView.xib is usually loaded automatically within the UIApplicationMain function, which is called in your main.m file. If you want to push a view with a navigation bar, you should create a UINavigationController (there's usually no need to subclass), and set your RootViewController object as the navigation controller's root view controller. Or, if you want to do it all in your xib file, you can drag a UINavigationController in and put your root view controller inside it. More info is in the View Controller Programming Guide.

0

精彩评论

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

关注公众号