             self.view.addSubview(self.pageControl)
         }
         
+        // Close Button
         if self.visibleCloseButton {
-            self.closeButton = UIButton(frame: CGRect(
-                x: CGRectGetWidth(self.view.frame) - 32.0 - 8.0, y: 8.0,
-                width: 32.0, height: 32.0)
-            )
+            self.closeButton = UIButton(frame: CGRectZero)
             var imagePath = self.resourceBundle().pathForResource("PhotoSliderClose", ofType: "png")
             self.closeButton!.setImage(UIImage(contentsOfFile: imagePath!), forState: UIControlState.Normal)
             self.closeButton!.addTarget(self, action: "closeButtonDidTap:", forControlEvents: UIControlEvents.TouchUpInside)
             self.closeButton!.imageView?.contentMode = UIViewContentMode.Center;
             self.view.addSubview(self.closeButton!)
+            self.layoutCloseButton()
+
         }
         
         if self.respondsToSelector("setNeedsStatusBarAppearanceUpdate") {
             self.setNeedsStatusBarAppearanceUpdate()
         }
     }
-
+    
     override public func viewWillAppear(animated: Bool) {
         self.scrollView.contentOffset = CGPointMake(self.scrollView.bounds.width * CGFloat(self.index), self.scrollView.bounds.height)
         self.scrollInitalized = true

        self.backgroundView = UIView(frame: self.view.bounds)
        self.backgroundView.backgroundColor = UIColor.blackColor()


        
        if floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1 {
            self.view.addSubview(self.backgroundView)
        } else {


        let contentViewBounds = self.view.bounds
        
        // Background View
        self.backgroundView.frame = contentViewBounds
        if floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_7_1 {
