Thanks for making this demo for UIViewPropertyAnimator, @JakeLin. I recently got around to checking out the project, having seen it a little while back in (I think) Dave Verwer's "iOS Dev Weekly. Ran into a few issues when trying to run the project, so this PR covers the changes needed to fix that.
Switching private to fileprivate (for simplicity, all of them have been changed to fileprivate).
Syntactic change from if-else using where to using guard instead.
Replacing if-else with switch where possible as it appeared this was the original intent.
Code comment mentions compiler error on checking enum value in switch; reason for error is explained here. For simplicity, enum value is force unwrapped.
Thanks for making this demo for
UIViewPropertyAnimator
, @JakeLin. I recently got around to checking out the project, having seen it a little while back in (I think) Dave Verwer's "iOS Dev Weekly. Ran into a few issues when trying to run the project, so this PR covers the changes needed to fix that.private
tofileprivate
(for simplicity, all of them have been changed tofileprivate
).if-else
usingwhere
to usingguard
instead.if-else
withswitch
where possible as it appeared this was the original intent.enum
value inswitch
; reason for error is explained here. For simplicity,enum
value is force unwrapped.