views:

849

answers:

3

Hi There, Ive created a multiview application that uses multiple controllers to display and control views. The problem Im having is, when the simulator initially loads the view the header is partially covered by the bar at top of screen and the tool bar at the base is not touching the base of the screen. I used the Interface builder size attributes to control the view when the iphone rotates and it works perfectly. All smaps into place perfectly both in landscape and portrait mode AFTER a rotation but the problem is with the initial load before a rotation occurs. Your thoughts a much appreciated. Tony

+1  A: 

I've had issues with views being clipped by status, nav, and tab bars. I've fixed most of them by using the Simulated Metrics feature in Interface Builder. That way what your laying out in IB is a lot more accurate to what your actually going to get.

Lounges
+2  A: 

I grappled with this issue for days and days--no amount of fiddling in IB worked.

Ultimately I got it to work by adding this line:

mainViewController.view.frame = window.screen.applicationFrame;

to the application:didFinishLaunchingWithOptions: method. (Where mainViewController is the primary UIViewController).

Thanks! I was struggling with this issue after creating my main view controller manually. Something in the controller (an ad view popup) was causing the children in the view to shift by the status bar height after the ad was dismissed.
denrk
A: 

link text

black2842