Skip to content

Commit 538ccda

Browse files
committed
Animate color changes, just wow
1 parent 685b044 commit 538ccda

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Example/Source/ViewController.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,11 @@ class ViewController: UIViewController {
126126
return UIColor(red: CGFloat(drand48()), green: CGFloat(drand48()), blue: CGFloat(drand48()), alpha: 1)
127127
}
128128

129-
self.waveform.wavesColor = randomColor()
130-
self.waveform.progressColor = randomColor()
129+
UIView.animate(withDuration: 0.3, animations: {
130+
self.waveform.wavesColor = randomColor()
131+
self.waveform.progressColor = randomColor()
132+
})
131133
}
132-
133134
override func viewDidLoad() {
134135
super.viewDidLoad()
135136
let thisBundle = Bundle(for: type(of: self))

0 commit comments

Comments
 (0)