UIView under the status bar

Hi, I have a strange problem after adding my UIViewController.view to the application window.

I created a window-based application and added my view to my appDelegates method didFinishLaunchingWithOptions.

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

    overviewViewController *overView = [[overviewViewController alloc] initWithNibName:@"overviewViewController" bundle:nil];
    //overView.view.bounds = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
    [window addSubview:overView.view];

    //[overView release];
    [window makeKeyAndVisible];

    return YES;
}

clicking the "Add" button is a model view controller. after rejecting this modelViewController the main view is perfect.

as you can see, I also tried to set boundaries before adding my subroutine without any success.

Does anyone have any tips for me, please, how to solve this problem?

+3
source share
2 answers

, viewDidLoad viewWillAppear:

self.view.frame = [[UIScreen mainScreen] applicationFrame];

, , ? ?

+3

, , , , nib.

, , .

+1

Source: https://habr.com/ru/post/1753946/


All Articles