【问题标题】:How to present modal view controller with transparent background如何呈现具有透明背景的模态视图控制器
【发布时间】:2015-04-07 10:13:41
【问题描述】:

我使用 swift 以及如何呈现模态视图控制器,但他的背景是透明的。其他视图控制器的内容在后面可见。

【问题讨论】:

  • 在发新问题之前搜索类似问题会更好

标签: ios swift uiviewcontroller presentmodalviewcontroller


【解决方案1】:

这个对我有用:

self.presentingViewController.providesPresentationContextTransitionStyle = YES;
self.presentingViewController.definesPresentationContext = YES;
modal.modalPresentationStyle = UIModalPresentationOverCurrentContext;

【讨论】:

    猜你喜欢
    • 2015-02-20
    • 2015-02-24
    • 1970-01-01
    • 2016-01-11
    • 1970-01-01
    • 1970-01-01
    • 2014-12-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多