                 }
             }
         }
+    }
+    
+    func makeTransition() {
+        UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, true, 0)
+        self.view.layer.renderInContext(UIGraphicsGetCurrentContext()!)
+        let currentViewScreenshot = UIGraphicsGetImageFromCurrentImageContext()
+        let frontConverImageView = UIImageView(image: currentViewScreenshot)
+        frontConverImageView.frame = self.view.bounds
+        self.view.addSubview(frontConverImageView)
+        self.view.backgroundColor = .redColor()
         
+        gravityBehaviour = UIGravityBehavior(items: [frontConverImageView])
+        dynamicItemBehaviour = UIDynamicItemBehavior(items: [frontConverImageView])
+        dynamicItemBehaviour.density = 3.0
+        gravityBehaviour.gravityDirection = CGVectorMake (3.0, 2.0)
+        gravityBehaviour.action = {
+            if (frontConverImageView.frame.intersects(self.view.frame) == false) {
+                frontConverImageView.removeFromSuperview()
+            }
+        }
+        
+        self.dynamicAnimator.removeAllBehaviors()
+        dynamicItemBehaviour.addAngularVelocity(CGFloat(0.4), forItem: frontConverImageView)
+        dynamicAnimator.addBehavior(dynamicItemBehaviour)
+        dynamicAnimator.addBehavior(gravityBehaviour)
     }
 }
    }
    
    override func viewDidLoad() {
        self.view.backgroundColor = UIColor.whiteColor()
        let activityIndicatorView = UIActivityIndicatorView()
        activityIndicatorView.translatesAutoresizingMaskIntoConstraints = false

//  Copyright © 2016 Jayesh Kawli Backup. All rights reserved.
//

import BlocksKit
import Foundation
import UIKit

class GameHomePageViewController: UIViewController {
    
    let viewModel: GameHomePageViewModel
    var dynamicAnimator: UIDynamicAnimator!
    var gravityBehaviour: UIGravityBehavior!
    var dynamicItemBehaviour: UIDynamicItemBehavior!
    
    init(viewModel: GameHomePageViewModel) {
        self.viewModel = viewModel
