views:

62

answers:

1

Using this code I am able to added two uiviews to my window

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    UIViewController* test = [[UIViewController alloc] init];
    UILabel* label = [[UILabel alloc] init];
    label.frame = CGRectMake(0, 0, 100, 20);
    label.text = @"foo";
    [test.view addSubview:label];
    test.view.backgroundColor = [UIColor redColor];
    [[[[UIApplication sharedApplication] delegate] window] addSubview:test.view];


    UIViewController* test2 = [[UIViewController alloc] init];
    UILabel* label2 = [[UILabel alloc] init];
    label2.frame = CGRectMake(100, 0, 100, 20);
    label2.text = @"bar";
    [test2.view addSubview:label2];
    test2.view.backgroundColor = [UIColor clearColor];
    [[[[UIApplication sharedApplication] delegate] window] addSubview:test2.view];

    [window makeKeyAndVisible];

    return YES;

}

however only the first uiview added responds to the in-call status bar changing the size of the screen

A: 

Did you ever find a solution to this problem? I am experiencing the same thing.

CKD
I got there in the end it wasn't so much a solution as I juggled the structure of my UIViews until it worked
msaspence