 }
 
 // The Main Class
-class SCLAlertView: UIView {
+class SCLAlertView: UIViewController {
     let kDefaultShadowOpacity: CGFloat = 0.7
     let kCircleHeight: CGFloat = 56.0
     let kCircleTopPosition: CGFloat = -12.0

        // 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
            }, completion: { finished in
                UIView.animateWithDuration(0.2, animations: {
                    self.center = self.rootViewController.view.center
				})
        })
        // Chainable objects

        contentView.layer.borderColor = UIColorFromRGB(0xCCCCCC).CGColor
    }
	
	override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
		super.init(nibName:nibNameOrNil, bundle:nibBundleOrNil)
	}
	
	override func viewDidLayoutSubviews() {
		println("Layout Subviews Called")
		super.viewWillLayoutSubviews()
		let sz = UIScreen.mainScreen().bounds.size
		// Set frames
		var r:CGRect
		if view.superview != nil {
			// View is showing, position at center of screen
			r = CGRect(x:(sz.width-kWindowWidth)/2, y:(sz.height-kWindowHeight)/2, width: kWindowWidth, height: kWindowHeight)
		} else {
			// View is not visible, position outside screen bounds
			r = CGRect(x:(sz.width-kWindowWidth)/2, y:-kWindowHeight, width: kWindowWidth, height: kWindowHeight)
		}
		view.frame = r
		contentView.frame = CGRect(x: 0, y: kCircleHeight / 4, width: kWindowWidth, height: kWindowHeight)
		circleViewBackground.frame = CGRect(x: kWindowWidth / 2 - kCircleHeightBackground / 2, y: kCircleBackgroundTopPosition, width: kCircleHeightBackground, height: kCircleHeightBackground)
		circleViewBackground.layer.cornerRadius = circleViewBackground.frame.size.height / 2
