I use NSTimer to update the UIButton header every second.
It works, but the text in the header automatically blinks (animated to alpha 0 and vice versa).
I tried using button.layer.removeAllAnimations() with no luck and no exceptions, so QuartzCore seems to be connected correctly.
Current idle paranoid code:
UIView.setAnimationsEnabled(false) UIView.performWithoutAnimation { button.setTitle(time, forState: .Normal) button.layer.removeAllAnimations() } UIView.setAnimationsEnabled(true)
ios objective-c animation swift uibutton
Ivera
source share