Advertisement
gust94

Untitled

Jul 13th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. UIView.animate(withDuration: 0.2, delay: 0.0,
  2. usingSpringWithDamping: 0.0,
  3. initialSpringVelocity: 0.0,
  4. options: [],
  5. animations: {
  6. var frame = (self.view.superview?.bounds)!
  7. self.view.superview?.isHidden = false
  8. if(self.isShown){
  9. self.view.superview?.isHidden = true
  10. frame.origin.x -= frame.size.width*3
  11. }
  12. self.view.frame = frame
  13. }, completion:{(success) in
  14. self.isShown = !self.isShown
  15. TheSettingsManager.isChannelViewActive = self.isShown
  16. TheAppController.homeVC.checkImageChannelsButton()
  17. if(self.isShown){
  18. self.leftViewWidthConstraint.constant = self.LEFT_VIEW_MAX_WIDTH
  19. self.searchBarHeightLayoutConstraint.constant = self.SEARCH_BAR_HEIGHT
  20. }
  21. self.backButton.setImage(UIImage(named:"back_wht"), for: .normal)
  22. })
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement