Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. if !hamburgerMenuIsVisible {
  2. leadingC.constant = 150
  3. trailingC.constant = 150
  4.  
  5. hamburgerMenuIsVisible = true
  6. } else {
  7. leadingC.constant = 0
  8. trailingC.constant = 0
  9.  
  10. hamburgerMenuIsVisible = false
  11. }
  12.  
  13. UIView.animate(withDuration: 0.2, delay: 0.0, options: .curveEaseIn, animations: {
  14. self.view.layoutIfNeeded()
  15. }) { (animationComplete) in
  16. print("The animation is complete.")
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement