-1
我已经为Swift语言创建了OSX按钮。我希望该按钮应该在我的Mac中下载图像。 我应该使用什么代码来下载该图像?如何使用swift语言在OS X中下载图像
下面是我使用的代码:
@IBAction func buttonPressed(sender: NSButton) {
buttonPresses+=1
theLabel.stringValue = "You've pressed the button \n \(buttonPresses) times!"
theButton.title = "Download\(buttonPresses)"
}
我都用过,但我没有得到又 – 2015-03-03 09:47:15
有一个错误 - -unresloved identifier – 2015-03-03 09:54:19
首先安装迦太基或CocoaPods的Alamofire,然后在源文件的开头添加'import Alamofire'。示例代码中的'self.imageView'只是一个指定UIImage的示例。请用代码中的其他任何东西替换'self.imageView'。 – 2015-03-03 10:45:37