开发者

From view to child table view

开发者 https://www.devze.com 2023-02-09 04:55 出处:网络
Can I start with a view based based app and when a button is touched jump to a \"child view\" with a NavigationBar and the back button to go back the main view?

Can I start with a view based based app and when a button is touched jump to a "child view" with a NavigationBar and the back button to go back the main view?

also...woul开发者_StackOverflow中文版d this be a violation of apple's store rules?


Sure - the trick is to have your navigation controller always present, but to use

setNavigationBarHidden:YES animated:NO

to make it hidden in your root view. In the child views you get there by pushing them as normal but use

setNavigationBarHidden:NO animated:YES

in their viewWillAppear. (tweak the animated property to make it look the way you prefer)

I don't think it violates any rules, I have used it in an app with a visual main menu that pushes child views and can pop them to return to that visual main menu showing no navigation bar.

0

精彩评论

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