I have created a button for OSX in Swift language. I wish that button should download an image in my Mac. What code should I use for downloading that image?
Following is the code that I used:
@IBAction func buttonPressed(sender: NSButton) {
buttonPresses+=1
theLabel.stringValue = "You've pressed the button \n \(buttonPresses) times!"
theButton.title = "Download\(buttonPresses)"
}