JakeLin / SaveTheDot

A game developed using UIViewPropertyAnimator
MIT License
804 stars 84 forks source link

minor updates for release xcode/swift 3 #2

Closed spacedrabbit closed 7 years ago

spacedrabbit commented 7 years ago

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.

  1. Switching private to fileprivate (for simplicity, all of them have been changed to fileprivate).
  2. Syntactic change from if-else using where to using guard instead.
  3. 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.