You can just use:
1 |
sender.setImage(UIImage(named: "buttonOn.png") , for: UIControlState.highlighted) |
in the button ACTION
But this way it works only since the second interraction. It is better to do the same thing in the ViewDidLoad for btnOUTLET
1 |
btnPlayButtonOUTLET.setImage(UIImage(named: "buttonPressed.png") , for: UIControlState.highlighted) |