简体   繁体   中英

Sliding Up/Down a UINavigationController

I have an app that uses a UINavigationController as its main way of showing data.I want a Settings screen to pop up, but I also want to be able to push new views for Settings. From what I've found, I can't use a UIViewController do to this. How can I present a view by sliding it, and also have content pushed onto it?

You can display the view for your view controller subclass either by presenting it modally (slides from the bottom and takes over the whole screen) or pushing it onto the navigation stack with animation (slides from the right and keeps the navigation bar).

In either case, you control the content of the view using your view controller subclass. Typically you update labels and controls in the viewWillAppear method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM