在ios7中黑屏后面的PopView控制器

时间:2015-08-31 09:22:42

标签: ios ios7 uiviewcontroller popup

这里我提到Code。

+ (void)setPresentationStyleForSelfController:(UIViewController *)selfController presentingController:(UIViewController *)presentingController
{
    if ([NSProcessInfo instancesRespondToSelector:@selector(isOperatingSystemAtLeastVersion:)])
    {
        //iOS 8.0 and above
        presentingController.providesPresentationContextTransitionStyle = YES;
        presentingController.definesPresentationContext = YES;

        [presentingController setModalPresentationStyle:UIModalPresentationOverCurrentContext];
    }
    else
    {
        [selfController setModalPresentationStyle:UIModalPresentationCurrentContext];
        [selfController.navigationController setModalPresentationStyle:UIModalPresentationCurrentContext];
    }
}

- (IBAction)onReadMore:(id)sender {

    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    ViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"ViewController"];
    [B_ViewController setPresentationStyleForSelfController:self presentingController:vc];
    [self.tabBarController presentViewController:vc animated:YES completion:nil];

}

Ios8很棒。

当我在iOS 7黑屏上运行时,会返回视图控制器。

任何可能的解决方案?

0 个答案:

没有答案