How to create uialertcontroller in global swift

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

    You can use my Utility class created for Show Alert in Swift4. Its super easy to use just by writing single line of code:

    Show Simple Alert

    @IBAction func showDefaultAlert(_ sender: Any) {
    
      Alert.showAlert(title:"Alert", message:"Default Alert")
    
    }
    

    Demo code link: https://github.com/smindia1988/EasyAlertInSwift4

提交回复
热议问题