我只想在点击并获得API响应后简单地更改UIButton的背景
所以我写了以下代码
@IBAction func followClick(sender: AnyObject)
{
//calling SOAP API
//Getting response
sender.backgroundColor = UIColor(red: 146/255.0, green: 29/255.0, blue: 29/255.0, alpha: 1.0)
}
但是的获取错误
背景颜色的模糊使用
请帮我完成这个简单的步骤。
有点笨。。。
刚刚替换为以下
@IBAction func followClick(sender: UIButton)
连接IBAction时忘记将类从AnyObject更改为UIButton。