I have a button that acts as a switch: I check the current state of the variable (stored in used defaults) and attribute it in viewDidAppear
When I press the left button (ignore the right one) it is acts as it should - swapping out 2 UIImage
s on button's UIImageView
but as soon as button goes out of focus - button switches image back to the default one. if no default image is specified in IB - button just goes to blank image.
How can I ensure button keeps the image after is goes out of focus? Do I need to implement additional focus delegate methods or something? I'm new tvOS and some things just don't make sense to me yet.
Doh, it appears you cannot just swap out UIImage
on UIImageView
property and have to use a button setter for such matter:
button.setImage(UIImage, forState: UIControlState.Normal)
It works fine this way