开发者

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.

  1. Use a modal view controller to prevent the user form interacting with other controls.
  2. Animate the UINavigationBar out or disable it in some way.
  3. Consider making the "Enter PIN" screen something the user sees when they first launch the application.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜