UITabbarController's “Done” button hidden behind UINavigationController

∥☆過路亽.° 提交于 2019-12-25 06:49:08

问题


I'm building a project using Xcode 4.2 and I'm also using the Storyboard. So basically, I have a UINavigationcontroller which is my initial view, connected to my "Main Menu" view. Inside my "Main Menu" I have a button that is linked to a tabbar controller, which has like 20 tabs. Therefore, a "More" button appears and when the "more" button is clicked an "edit" button appears. Everything works fine, but the only problem I have is that once I click edit, the configure page slides up and the "done" button is hidden behind the Navigation bar. Anyway I can the configure page slide up infront of the Navigation bar ?

Also, I used the Xcode 4.2's new feature. Where you can "Embed in NavigationController" and "Embed in TabbarController" under the Editor Toolbar. Thank you !


回答1:


An instance of UITabBarController should only ever be the root view controller of your window. Placing a UITabBarController inside another container view controller, like UINavigationController, can lead to undefined behavior.

From the UITabBarController Class Reference...

Because the UITabBarController class inherits from the UIViewController class, tab bar controllers have their own view that is accessible through the view property. When deploying a tab bar interface, you must install this view as the root of your window. Unlike other view controllers, a tab bar interface should never be installed as a child of another view controller.



来源:https://stackoverflow.com/questions/8555281/uitabbarcontrollers-done-button-hidden-behind-uinavigationcontroller

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