当转向模态视图时,iAD消失

时间:2013-09-09 11:24:24

标签: segue iad adbannerview

我有一个独特的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];
    }
}

0 个答案:

没有答案