美文网首页
iOS presentViewController 背景透明

iOS presentViewController 背景透明

作者: JohnayXiao | 来源:发表于2020-06-12 10:23 被阅读0次
    ShowResultsViewController *vc = [ShowResultsViewController new];
    vc.passDict = dict0;
    vc.view.backgroundColor=[UIColor colorWithWhite:0 alpha:0.4];
    //关键语句,必须有
    vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
    [self presentViewController:vc animated:YES completion:^(void){
        vc.view.superview.backgroundColor = [UIColor clearColor];
    }];

相关文章

网友评论

      本文标题:iOS presentViewController 背景透明

      本文链接:https://www.haomeiwen.com/subject/yacgtktx.html