Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let animationDuration: TimeInterval? = subviewsInLayoutOrder
- .flatMap({ $0.layer.resolveAnimationDuration }).first ?? duration
- if let duration = animationDuration {
- let options: UIViewAnimationOptions = [.allowUserInteraction, .beginFromCurrentState]
- UIView.animate(withDuration: duration, delay: 0.0, options: options, animations: {
- self.runLayoutSubviewsAlgorithm()
- })
- } else {
- runLayoutSubviewsAlgorithm()
- }
Add Comment
Please, Sign In to add comment