I tried multiple solutions from stack overflow but no luck. I have set HighlightedAdjustsImage = false
In my Code :
button.backgroundColor = .clear
button.layer.borderWidth = 0
inside my IBAction
for button I am changing image and also setting value of isSelected as :
*button.isSelected = !button.isSelected*
what did i do wrong here?
The problem is the Style setting of your button in the storyboard (the second popup menu in your screenshot).
Change the Style from Plain to Default and the button will start working according to your specification.