首页 > 代码库 > uiviewcontroller的modal半透明问题.

uiviewcontroller的modal半透明问题.

        如果对你有用,记得留言哟...

        //弹出视图

        UIStoryboard *secondStoryBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

        reviewViewController2* review2obj = [secondStoryBoard instantiateViewControllerWithIdentifier:@"reviewViewController2"];

        

        //赋值

        [review2obj setValue:xxx forKey:@"xxx"];

        [review2obj setValue:xxx forKey:@"xxx"];

        [review2obj setValue:xxx forKey:@"xxx"];

        

        //ios8黑层处理

        [review2obj setModalPresentationStyle:UIModalPresentationOverCurrentContext];

        self.navigationController.providesPresentationContextTransitionStyle = YES;

        self.navigationController.definesPresentationContext = YES;

        

        //ios6-7黑层处理

        UIViewController* controller = self.view.window.rootViewController;

        controller.modalPresentationStyle = UIModalPresentationCurrentContext;

        self.navigationController.view.backgroundColor=[UIColor clearColor];

        

        //跳转

        [self presentViewController:review2obj animated:NO completion:^{

        }];

uiviewcontroller的modal半透明问题.