Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FirstCustomSegue: UIStoryboardSegue {
- override func perform() {
- // Value of type 'FirstCustomSegue' has no member 'sourceGameViewController'
- var firstVCView = self.sourceGameViewController.view as UIView!
- var secondVCView = self.destinationGameViewController.view as UIView!
- // Cannot call value of non-function type 'UIScreen'
- let screenWidth = UIScreen.mainScreen().bounds.size.width
- let screenHeight = UIScreen.mainScreen().bounds.size.height
- secondVCView.frame = CGRectMake(0.0, screenHeight, screenWidth, screenHeight)
- // Cannot call value of non-function type 'UIApplication'
- let window = UIApplication.sharedApplication().keyWindow
- window?.insertSubview(secondVCView, aboveSubview: firstVCView)
- // Value of type 'FirstCustomSegue' has no member 'sourceGameViewController' (This is in the (Finished) line, of course)
- UIView.animateWithDuration(0.4, animations: { () -> Void in
- firstVCView.frame = CGRectOffset(firstVCView.frame, 0.0, -screenHeight)
- secondVCView.frame = CGRectOffset(secondVCView.frame, 0.0, -screenHeight)
- }) { (Finished) -> Void inself.sourceGameViewController.presentGameViewController(self.destinationGameViewController as UIViewController,
- animated: false,
- completion: nil)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement