im Sorry I´m a litte rusty in coding and i couldn't figure this out. He goes through all the colors till he es back again on blue. After a If statement is true he shouldn't look for the next one. Thanks for your understanding...
@IBAction func didTapLike(){
if profilImage.image == UIImage(named: "blue"){
profilImage.image = UIImage(named: "yellow")
}
if profilImage.image == UIImage(named: "yellow"){
profilImage.image = UIImage(named: "green")
}
if profilImage.image == UIImage(named: "green"){
profilImage.image = UIImage(named: "purple")
}
if profilImage.image == UIImage(named: "purple"){
profilImage.image = UIImage(named: "red")
}
if profilImage.image == UIImage(named: "red"){
profilImage.image = UIImage(named: "blue")
}
else {
}
}