Last active
July 6, 2018 23:48
-
-
Save JillevdW/d790d731625e07f87e3c4cb546df2948 to your computer and use it in GitHub Desktop.
phone check
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
if UIScreen.main.bounds.height < 812 { | |
UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 100, initialSpringVelocity: 30, options: [.curveEaseOut, .allowUserInteraction], animations: { | |
self.frame.origin = nearestCornerPosition | |
}, completion: nil) | |
} else { | |
UIView.animate(withDuration: 1, delay: 0, usingSpringWithDamping: 100, initialSpringVelocity: 10, options: [.curveEaseOut, .allowUserInteraction], animations: { | |
self.frame.origin = nearestCornerPosition | |
}, completion: nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment