Monday, 15 July 2019

Call function in iOS



//Eable call function
    @IBAction func onClickCallBtn(_ sender: Any) {
        guard let url = URL(string: "tel://self.mobile") else {
            return //be safe
        }
        
        if #available(iOS 10.0, *) {
            UIApplication.shared.open(url)
        } else {
            UIApplication.shared.openURL(url)
        }

    }

No comments:

Post a Comment

Difference between == and ===

Difference between == and === https://stackoverflow.com/questions/24002819/difference-between-and == operator checks if their ...