views:

38

answers:

0

Hi,

This is some kind of a basic question:

I am adding a new Subview to a window using:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    viewController = [[myViewController alloc] initWithNibName:@"myNib" bundle:nil];
    [window addSubview:viewController.view];

This displays the view at 100% on the window, having the Clock overlaying some pixels of that view on top.

Rotating makes the view aware of the clock and resizes it to begin correctly below the clock without any overlay.

What is the correct way to add a subview to a new window, making it aware of its available window size?