#ifdef __IPHONE_8_0

        if ([EFUNKakaoCenter deviceOsVersion].intValue < 8) {

            [UIApplication sharedApplication].keyWindow.rootViewController.providesPresentationContextTransitionStyle = YES;

            [UIApplication sharedApplication].keyWindow.rootViewController.definesPresentationContext = YES;

            [[UIApplication sharedApplication].keyWindow.rootViewController setModalPresentationStyle:UIModalPresentationCurrentContext];  //注意,iOS8以下是设置rootViewController为ModalPresentationCurrentContext模式

        } else {

            [self setModalPresentationStyle:UIModalPresentationOverCurrentContext];//iOS8或以上是设置要被present的viewController为ModalPresentationOverCurrentContext模式

        }

#else

        [UIApplication sharedApplication].keyWindow.rootViewController.providesPresentationContextTransitionStyle = YES;

        [UIApplication sharedApplication].keyWindow.rootViewController.definesPresentationContext = YES;

        [[UIApplication sharedApplication].keyWindow.rootViewController setModalPresentationStyle:UIModalPresentationCurrentContext];

#endif

 

相关文章:

  • 2022-01-16
  • 2022-12-23
  • 2021-08-28
  • 2021-12-04
  • 2021-11-17
  • 2021-09-16
  • 2021-11-18
  • 2022-02-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2021-10-18
相关资源
相似解决方案