UIPopoverPresentationController on iPhone with iOS 10

前端 未结 4 624
刺人心
刺人心 2021-01-14 09:05

I\'m trying to display a ViewController as a popover on an iPhone. I have already been through several answers on SO and the rest of the web but none have worked so far. I w

4条回答
  •  余生分开走
    2021-01-14 09:18

    Add:

    vc.popoverPresentationController?.delegate = self 
    

    just before the line:

    present(vc, animated: true, completion: nil)
    

提交回复
热议问题