美文网首页
iOS 模态推出presentViewController半透明

iOS 模态推出presentViewController半透明

作者: 啵啵_long_港 | 来源:发表于2018-02-27 16:11 被阅读11次
    UIViewController *vc = [[UIViewController alloc] init];
    vc.view.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5];
    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
    nav.modalPresentationStyle = UIModalPresentationOverCurrentContext;
    nav.view.backgroundColor = [UIColor clearColor];
    [self presentViewController:nav animated:YES completion:nil];
    

    相关文章

      网友评论

          本文标题:iOS 模态推出presentViewController半透明

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