iphone - View not drawn correctly when switching views -


My app has 3 ideas. I switch between AppDelegate to switch between each view 3 helpful methods have defined (so that each view can call others), which looks like this:

  - (IBAction) goToView1 {if (view1 == blue) {View1 * ThisView = [[View1 alloc] initWithNibName: @ "View1" bundle: zero]; Scenario 1 = This view; } (See in UIView * window.subviews) [see viewFromSuperview]; [Add window Sweeview: Scene 1. View]; }  

If the user wants to switch to another view, then I put a button to define IBAction in the controller of the view:

< Pre> - (IBAction) goToOtherView: (ID) sender {ViewSwitcherAppDelegate * root = [[UIApplication shared application] representative]; [Root goToView1]; }

It works fine to switch all the scenes, but when the view is drawn it is displayed incorrectly, as it is ignoring the status bar:

What am I doing wrong?

When the app starts, it gets cured, so I suspect that there is something wrong with the way I am adding subviews in the window.

Thanks in advance!

Since you are not using the controller of the scene to display it, you have to adjust To keep the location in view frame itself for the position bar, you have to set its origin {0, 20}.

But you would better to use UIViewController and press it on UINavigationController.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -