How to create uialertcontroller in global swift

后端 未结 12 1737
情深已故
情深已故 2020-12-05 12:09

I\'m trying to create uialertcontroller in Config.swift file as follow.

static func showAlertMessage(titleStr:String, messageStr:St         


        
12条回答
  •  情书的邮戳
    2020-12-05 12:34

    This is also the way you can present on top of the View Controller available.

    UIApplication.topViewController()?.present(alertViewController!, animated: true, completion: nil)

提交回复
热议问题