stefanjaindl

Checkout blog posts about various topics helpful to software developers everyday life

blog

This article is part 3 of my UIKit Cheatsheet series. It deals with tricks for UIButton.

One tricky issue with UIButton that consists of text as well as an image, when using highlighting animation on button press, is that the image gets greyed too much, but shouldn't be. Animations for images embedded in buttons can be disabled as follows:

myButton.adjustsImageWhenHighlighted = false
myButton.adjustsImageWhenDisabled = false

Next Post Previous Post