Good,
How do I insert a link into a button I tried as below and did not work.
@IBAction func urlDisplay(_ sender: AnyObject) {
UIApplication.sharedApplication().openURL(NSURL(String:"http://www.quatenus.co.ao")!)
}
In Swift 4 the code looks like this:
UIApplication.shared.openURL(URL(string: "http://www.quatenus.co.ao")!)
In your code there is no error, XCode is only notifying you of an update to the function call (shared only)
Using Swift 3 the code would look like this:
@IBAction func urlDisplay(_ sender: AnyObject) {
let url = URL(string: "http://www.quatenus.co.ao/")!
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.openURL(url)
}
}