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

Posted by favo on Stack Overflow See other posts from Stack Overflow or by favo
Published on 2010-05-22T09:19:35Z Indexed on 2010/05/22 9:30 UTC
Read the original article Hit count: 280

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about xcode