UIAlertController is Crashed (iPad)

后端 未结 10 1743
长情又很酷
长情又很酷 2020-12-13 17:58

I am using Xcode 6 to develop an iOS Application.

When I used UIAlertController, it can be worked well on iPhone 6 simulator, but crashes on iPad simula

10条回答
  •  [愿得一人]
    2020-12-13 18:49

    Swift 3

    shareMenu.popoverPresentationController?.sourceView = self.view
    shareMenu.popoverPresentationController?.sourceRect = 
        CGRect(x: view.bounds.size.width, 
               y: view.bounds.size.height-80, 
               width: 1.0, height: 1.0)
    

    source rect is the point from were you want to show popover view.

提交回复
热议问题