how to open url in safari from my app?

When user click on the button open safari with given url.

Control-drag to your code to make an IBAction method. In the IBAction, call openURL.


let url = NSURL(string: "http : //foo.bar.com")!
UIApplication.sharedApplication().openURL(url)
how to open url in safari from my app?
 
 
Q