iOS presentViewController背景色透明

廢話少說:presentViewController背景色透明。

    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];
    }];


發佈了47 篇原創文章 · 獲贊 16 · 訪問量 13萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章