UIAlertController is Crashed (iPad)

后端 未结 10 1752
长情又很酷
长情又很酷 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:33

    If you don't need presenting the alert as popover, you can simply use UIAlertController.Style.alert as preferred style, when initializing AlertViewController.

    let shareMenu = UIAlertController(title: nil, message: "Share using", preferredStyle: .alert)
    

提交回复
热议问题