我有一个独特的viewController用于横向模式,问题是当我转向横向视图控制器(模态segue)时,iAD消失了,它似乎也停止接收委托方法。只有当我点击标签栏转到另一个视图然后再返回时再次显示
- (void)orientationChanged:(NSNotification *)notification
{
NSLog(@"orientation changed");
UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation;
if (UIDeviceOrientationIsLandscape(deviceOrientation) && !isShowingLandscapeView && isThisView)
{
//[self.view bringSubviewToFront:self.backgroundImageView];
[self performSegueWithIdentifier:@"DisplayLandscapeView" sender:self];
isShowingLandscapeView = YES;
}
else if (deviceOrientation == UIDeviceOrientationPortrait && isShowingLandscapeView)
{
[self dismissViewControllerAnimated:YES completion:nil];
isShowingLandscapeView = NO;
self.bannerView.hidden = NO;
//[self.view sendSubviewToBack:self.backgroundImageView];
}
}