Add view controller over tab bar based application with navigation controller?
I want to add a view controller over navigation view controller in a tab bar application which covers the full screen.
I have crated a view controller (enterPin) and added over the current navigationview controller in a tab bar application.
[self.view addSubview: enterPin.view];
but bottom bar, navigation controller and status bar is not hidding and comes over enterPin view controller. If we hide bottom bar, navigationcontroller and status bar it gi开发者_开发技巧ve white screen at back.
I want the view controller (enterPin) should appear over the navigationview controller (self.view).
Use modal view controller: Tutorial and documentation. Does exactly what you are asking for.
This is very normal behavior. 95% of the time the developer would not want the UINavigationBar
to be covered by another view. You have a few options.
- Use a modal view controller to prevent the user form interacting with other controls.
- Animate the
UINavigationBar
out or disable it in some way. - Consider making the "Enter PIN" screen something the user sees when they first launch the application.
精彩评论