我的应用程序有问题。我有一个 UIImageView “Default-Landscape.png” 的飞溅代码是:
- (void)showLoadingWithTitle:(NSString*)loadingTitle {
if(![self.view viewWithTag:123456]) {
UIImageView *overlayView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
//overlayView.backgroundColor = [UIColor lightGrayColor];
overlayView.tag = 123456;
overlayView.autoresizingMask = UIViewAutoresizingFlexibleWidth+UIViewAutoresizingFlexibleHeight;
overlayView.image = [UIImage imageNamed:@"Default-Landscape.png"];
}
}
到目前为止,一切都很好。当我将 iPad 旋转到纵向时出现问题,我认为 Portait 正在加载横向图像,因为它看起来不像应该的那样,我不知道该怎么办...¿任何想法?