Created
January 18, 2019 05:48
-
-
Save Aymenworks/8ec6f8731cec5eeb72b88c14c553b731 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch progress { | |
case AnimationState.full.rawValue...: | |
let newProgress = (progress - AnimationState.full.rawValue) / (AnimationState.finalBigSize.rawValue - AnimationState.full.rawValue) | |
let scale = 1 + (maxScale-1) * newProgress | |
foregroundButton.transform = CGAffineTransform(scaleX: scale, y: scale) | |
case ...AnimationState.full.rawValue: | |
foregroundButton.transform = .identity | |
default: | |
print("surprise") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment