Present a popover from an arbitrary anchor point in Swift

前端 未结 3 767
旧时难觅i
旧时难觅i 2020-12-13 22:57

I know how to present a popover from a bar button item as is described in this answer (for both iPhone and iPad).

I would like to add a popover for an arbit

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 23:10

    Update to func syntax above:

    func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentatinStyle { 
        return .none 
    }
    

    For some reason the old syntax is still allowed but is not active and will not implement popup or anchor correctly.

提交回复
热议问题