UITabBarController's 'More' navigation controller disappears under UINavigationController

梦想与她 提交于 2019-12-20 05:40:58

问题


I am using a UITabBarController as well as a UINavigationController on my app.

In my UITabBarController I am using more than 5 items so I automatically get the 'More' item. I've managed to add a saving procedure so the order of those items will be kept in case somebody changes the order etc.

With 'More' active I get the More navigation controller with the 'Edit' item positioned under my UINavigationController. Both navigation controller are visible. When I click on 'Edit though the More navigation controller disappears and seem to be hiding under my UINavigationController and therefore I can't see/use the 'Done' function to save my new order

What did I miss?

Cheers


回答1:


It sounds like you have a UINavigationController as the main VC of your app, and a UITabBarController as one of the VC's on its stack.

I believe Apple actively discourages people from doing this in their apps, and so do I. It is never done in the iOS itself, and I have never seen it in any third-party apps either, so users will probably be confused.

I think you should embed the UINavigationController inside the UITabBarController instead of the other way around, or you could just choose to use another way of showing what you want to show.




回答2:


I believe iOS does use both navigation controller and tab controller at the same time in their iPod app. The navigation controller takes you to the playing song and back and at the same time you have the tab controller when you select songs/albums/playlists etc. However, the navigation controller (or tab bar controller) seems to be custom made as it handles the More->Edit case by hiding the navigation bar underneath the Edit bar, which is not what the default UITabBarController does.

All in all, I see Apple is rather "creative" when it comes to UI design. For example, in the email app, "New" button is in the lower right corner (bottom bar) while in the SMS app the "New" button is in the upper right corner (navigation bar). I think they pretty much make custom UI to fit the individual needs of the app instead or rigidly following some consistent design.



来源:https://stackoverflow.com/questions/3050739/uitabbarcontrollers-more-navigation-controller-disappears-under-uinavigationc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!