UIPopoverPresentationController displaying popover as full screen

前端 未结 6 2059
小蘑菇
小蘑菇 2020-12-24 12:24

I am trying to use UIPopoverPresentationController to display a popover that doesn\'t take up the whole screen. I\'ve followed many different tutor

6条回答
  •  悲&欢浪女
    2020-12-24 12:52

    For Swift3/IOS10, looks like we need to do some thing like

    func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle
    {
        return .none
    }
    

    Adding this answer, in case, someone runs into this problem as i did when migrating to swift3/IOS10

提交回复
热议问题