Good, therefore, the reason for this is that it [[UIScreen mainScreen] applicationFrame]will return the window frame minus the size of the status bar if it is visible.
To fix this, an easy way:
UIView* baseView = [[UIView alloc] initWithFrame:CGRectMake(0,
0,
[[UIScreen mainScreen] applicationFrame].size.width,
[[UIScreen mainScreen] applicationFrame].size.height)];
[self.view addSubview:baseView];
[baseView setBackgroundColor:[UIColor blackColor]];
baseView.userInteractionEnabled = YES;
baseView.alpha = 0.7;
Petar source
share