Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. class FirstCustomSegue: UIStoryboardSegue {
  2.  
  3. override func perform() {
  4. // Value of type 'FirstCustomSegue' has no member 'sourceGameViewController'
  5. var firstVCView = self.sourceGameViewController.view as UIView!
  6. var secondVCView = self.destinationGameViewController.view as UIView!
  7.  
  8. // Cannot call value of non-function type 'UIScreen'
  9. let screenWidth = UIScreen.mainScreen().bounds.size.width
  10. let screenHeight = UIScreen.mainScreen().bounds.size.height
  11.  
  12. secondVCView.frame = CGRectMake(0.0, screenHeight, screenWidth, screenHeight)
  13.  
  14. // Cannot call value of non-function type 'UIApplication'
  15. let window = UIApplication.sharedApplication().keyWindow
  16. window?.insertSubview(secondVCView, aboveSubview: firstVCView)
  17.  
  18. // Value of type 'FirstCustomSegue' has no member 'sourceGameViewController' (This is in the (Finished) line, of course)
  19.  
  20. UIView.animateWithDuration(0.4, animations: { () -> Void in
  21. firstVCView.frame = CGRectOffset(firstVCView.frame, 0.0, -screenHeight)
  22. secondVCView.frame = CGRectOffset(secondVCView.frame, 0.0, -screenHeight)
  23.  
  24. }) { (Finished) -> Void inself.sourceGameViewController.presentGameViewController(self.destinationGameViewController as UIViewController,
  25. animated: false,
  26. completion: nil)
  27. }
  28. }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement