Мне нужно показать вид, который охватывает весь экран. Для этого я использую этот код:
self.modalView = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
self.modalView.opaque = NO;
self.modalView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5f];
CheckBookAppDelegate *delegate = (CheckBookAppDelegate *)[UIApplication sharedApplication].delegate;
UIActivityIndicatorView *myIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
myIndicator.center = CGPointMake(160, 240);
[myIndicator startAnimating];
UILabel *label = [[[UILabel alloc] initWithFrame:frame] autorelease];
label.text = @"Enviando...";
label.textColor = [UIColor whiteColor];
label.font = [UIFont fontWithName:@"Arial Rounded MT Bold" size:(18.0)];
label.backgroundColor = [UIColor clearColor];
label.opaque = NO;
[label sizeToFit];
[self.modalView addSubview:label];
[self.modalView addSubview:myIndicator];
[delegate.window addSubview:modalView];
[myIndicator release];
Проблема в том, что мне нужно показывать в альбомном режиме, потому что когда отображается вид, он появляется в портретном режиме (хотя ipad находится в альбомном режиме и viewController тоже).
Есть идеи?
Спасибо