Guest User

Untitled

a guest
Feb 25th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. let animationDuration: TimeInterval? = subviewsInLayoutOrder
  2. .flatMap({ $0.layer.resolveAnimationDuration }).first ?? duration
  3.  
  4. if let duration = animationDuration {
  5. let options: UIViewAnimationOptions = [.allowUserInteraction, .beginFromCurrentState]
  6. UIView.animate(withDuration: duration, delay: 0.0, options: options, animations: {
  7. self.runLayoutSubviewsAlgorithm()
  8. })
  9. } else {
  10. runLayoutSubviewsAlgorithm()
  11. }
Add Comment
Please, Sign In to add comment