[Solved] Value of type ‘(UIButton) -> ()’ has no member ‘setImage’


Your @IBAction function has the same name as the button, this causes a name ambiguity. Change the name of the function to something else.

@IBAction func houseLockPressed(_ sender: UIButton)

Also, you are missing the button’s name in the third line. Change self to self.houseLock to refer to the button.

9

solved Value of type ‘(UIButton) -> ()’ has no member ‘setImage’