开发者

Convention for multi-view iOS application

I'm new to d开发者_StackOverfloweveloping iOS applications, but I have a quick question about implementing a multi-view application.

I'm assuming to create an application with multiple views I must create my view controller classes, and instantiate all of them within my appDelegate class in order to switch back and forth between views?


Maybe.

With a UINavigationController you typically instantiate them in your current view controller, in response to some user action, then push the new controller onto the the UINavigationController stack.

If you're using a UITabBarController, you need to instantiate them before you put them in the tab bar, so you might do that in the app delegate in application:didFinishLaunchingWithOptions:.

It depends on how you plan to switch between them.


UINavigationController is your friend Casey..This tutorial will explain it..No need to create all viewControllers in appDelegate.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜