views:

49

answers:

1

In my iPad application, I have a 768x30 px view i place just below the status bar with coordinates (0,0). The status bar is also fully visible. When the app launches the status bar overlaps the view, so the view appears under the status bar. I am creating the view in Interface builder and it also appears correctly on there.

The view appears in the correct position automatically after the screen rotates though. And if I rotate back to landscape the position is still correct. It is only right after launch, before any rotations that is appears out of place. Any ideas?

Thanks

A: 

I was able to resolve my issue by adding a Window to my NIB and then adding my view to it, then.

Hopefully that will help you too.

Chad
http://stackoverflow.com/questions/487150/uiview-clipped-by-statusbar-until-autorotate/2893971#2893971 is where I found my real answer. The method I described blocked the UI from rotating for some reason, I undid what I did and then added the mainViewController.view.frame = window.screen.applicationFrame; to the -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method.
Chad
Thanks Chad. The approach of setting the rootViewcontroller's frame to the application frame worked. This problem had been lingering for days with no solution till now... Good stuff
Innovative1