This can be done using transition animation of a UIView. It does not matter the isHighlighted
property is not animatable, because it transitions the whole view.
Swift 3
UIView.transition(with: button,
duration: 4.0,
options: .transitionCrossDissolve,
animations: { button.isHighlighted = true },
completion: nil)
Objective-C
[UIView transitionWithView:button
duration:4.0
options:UIViewAnimationOptionTransitionCrossDissolve
animations:^{ button.highlighted = YES; }
completion:nil];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…