How to create uialertcontroller in global swift

后端 未结 12 1702
情深已故
情深已故 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:43

    If you want to present from AppDelegate windows you can use like this

    UIApplication.sharedApplication().delegate?.window.rootViewController?.presentViewController(vc, animated: true, completion: nil)
    

提交回复
热议问题