iOS presentViewController 背景透明

2020-06-12  本文已影响0人  JohnayXiao
    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];
    }];
上一篇 下一篇

猜你喜欢

热点阅读