         // Animate in the alert view
         UIView.animateWithDuration(0.2, animations: {
 				self.shadowView.alpha = self.kDefaultShadowOpacity
-				self.frame.origin.y = self.rootViewController.view.center.y - 100
-				self.alpha = 1
+				self.view.frame.origin.y = self.rootViewController.view.center.y - 100
+				self.view.alpha = 1
             }, completion: { finished in
                 UIView.animateWithDuration(0.2, animations: {
-                    self.center = self.rootViewController.view.center
+                    self.view.center = self.rootViewController.view.center
 				})
         })
         // Chainable objects

    func hideView() {
        UIView.animateWithDuration(0.2, animations: {
            self.shadowView.alpha = 0
            self.alpha = 0
            }, completion: { finished in
                self.shadowView.removeFromSuperview()
                self.removeFromSuperview()
        })
    }
    

    
    // showTitle(view, title, subTitle, duration, style)
    func showTitle(vc:UIViewController, title: String, subTitle: String, duration: NSTimeInterval?, completeText: String?, style: SCLAlertViewStyle) -> SCLAlertViewResponder {
        view.alpha = 0
        rootViewController = vc
		// Add subviews
		rootViewController.addChildViewController(self)
        rootViewController.view.addSubview(shadowView)
        rootViewController.view.addSubview(view)
		// Autolayout constraints for shadow view (to handle device rotation)
		let c1 = NSLayoutConstraint(item:shadowView, attribute:NSLayoutAttribute.Width, relatedBy: NSLayoutRelation.Equal, toItem:vc.view, attribute:NSLayoutAttribute.Width, multiplier: 1.0, constant:0.0)
        vc.view.addConstraint(c1)
