first of all you need to give tag to UIButton
@IBOutlet var btn: UIButton!
let circleArray = ["circle-gray-big","circle-green-big","circle-red-big"]
override func viewDidLoad() {
super.viewDidLoad()
see.btn.tag = 0
}
@IBAction func carbsButton(_ sender: Any) {
button.setImage(UIImage(named: circleArray[btn.tag % 3]),forState:Normal)
btn.tag = ban.tag + 1
}
Do in this manner you will definitely get what you want..If it solve the problem hit up arrow.