开发者

iPhone SDK: Using the NavigationController, how to invoke another view?

开发者 https://www.devze.com 2022-12-10 13:18 出处:网络
I am开发者_如何学编程 using a NavigationController and I want to be able to put another view on the stack in relation to some event. I am not sure what the call is.

I am开发者_如何学编程 using a NavigationController and I want to be able to put another view on the stack in relation to some event. I am not sure what the call is.

Thanks in advance.


On the iPhone, it's very rare you'll be handling UIView objects directly for application flow.

What you want to do is create a UIViewController that is the owner of a view. You then push the view controller (and in doing so it's associated view) to the top by calling your UINavigationController's pushViewController:animated: method.

You might want to read the View Controller Programming Guide, more specifically, the section on the Navigation Controller. The guide explains the basic principles of how it works, and gives code examples of common tasks.

0

精彩评论

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