         self.scrollView.scrollEnabled = true
         self.scrollView.showsHorizontalScrollIndicator = false
         self.scrollView.showsVerticalScrollIndicator = false
-        
-        self.scrollView.backgroundColor = UIColor(red: 0/255, green: 0/255, blue: 0/255, alpha: 0.0)
+        self.scrollView.backgroundColor = UIColor.clearColor()
+        
+        self.backgroundView.backgroundColor = UIColor(red: 0/255, green: 0/255, blue: 0/255, alpha: 0.8)
         self.view.addSubview(self.scrollView)
         
         

            self.imageHeight = scale * (self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0)
            let imageX = ((self.referenceFrame.size.width - self.imageWidth) / 2) + self.referenceFrame.origin.x
            let imageY = ((self.referenceFrame.size.height - self.imageHeight) / 2) + self.referenceFrame.origin.y
            self.referenceFrame = CGRectMake(imageX, imageY, self.imageWidth, self.imageHeight)
        case .ScaleAspectFill:
            let scale = max(widthRatio, heightRatio)
            self.imageWidth = scale * (self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0)
            self.imageHeight = scale * (self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0)
            let imageX = ((self.referenceFrame.size.width - self.imageWidth) / 2) + self.referenceFrame.origin.x
            let imageY = ((self.referenceFrame.size.height - self.imageHeight) / 2) + self.referenceFrame.origin.y
            self.referenceFrame = CGRectMake(imageX, imageY, self.imageWidth, self.imageHeight)
        case .ScaleToFill:
            self.imageWidth = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0
            self.imageHeight = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0
            self.referenceFrame = self.referenceImageView.frame
        case .Top:
            self.imageWidth = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0
            self.imageHeight = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0
            let imageX = ((self.referenceFrame.size.width - self.imageWidth) / 2) + self.referenceFrame.origin.x
            let imageY = self.referenceFrame.origin.y
            self.referenceFrame = CGRectMake(imageX, imageY, self.imageWidth, self.imageHeight)
        case .Bottom:
            self.imageWidth = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0
            self.imageHeight = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0
            let imageX = ((self.referenceFrame.size.width - self.imageWidth) / 2) + self.referenceFrame.origin.x
            let imageY = (self.referenceFrame.size.height + self.referenceFrame.origin.y) - self.imageHeight
            self.referenceFrame = CGRectMake(imageX, imageY, self.imageWidth, self.imageHeight)
        case .Left:
            self.imageWidth = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0
            self.imageHeight = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0
            let imageX = self.referenceFrame.origin.x
            let imageY = ((self.referenceFrame.size.height - self.imageHeight) / 2) + self.referenceFrame.origin.y
            self.referenceFrame = CGRectMake(imageX, imageY, self.imageWidth, self.imageHeight)
        case .Right:
            self.imageWidth = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0
            self.imageHeight = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0
            let imageX = (self.referenceFrame.origin.x + self.referenceFrame.size.width) - self.imageWidth
            let imageY = ((self.referenceFrame.size.height - self.imageHeight) / 2) + self.referenceFrame.origin.y
            self.referenceFrame = CGRectMake(imageX, imageY, self.imageWidth, self.imageHeight)
        case .Center:
            self.imageWidth = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0
            self.imageHeight = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0
            let imageX = self.referenceImageView.frame.origin.x + ((self.referenceImageView.frame.width - self.imageWidth) / 2)
            let imageY = self.referenceImageView.frame.origin.y + ((self.referenceImageView.frame.height - self.imageHeight) / 2)
            self.referenceFrame = CGRectMake(imageX, imageY, self.imageWidth, self.imageHeight)
        case .TopLeft:
            self.imageWidth = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0
            self.imageHeight = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0
            let imageX = self.referenceFrame.origin.x
            let imageY = self.referenceFrame.origin.y
            self.referenceFrame = CGRectMake(imageX, imageY, self.imageWidth, self.imageHeight)
        case .TopRight:
            self.imageWidth = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0
            self.imageHeight = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0
            let imageX = self.referenceFrame.origin.x + self.referenceFrame.size.width - self.imageWidth
            let imageY = self.referenceFrame.origin.y
            self.referenceFrame = CGRectMake(imageX, imageY, self.imageWidth, self.imageHeight)
        case .BottomLeft:
            self.imageWidth = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0
            self.imageHeight = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0
            let imageX = self.referenceFrame.origin.x
            let imageY = self.referenceFrame.origin.y + self.referenceFrame.size.height - self.imageHeight
            self.referenceFrame = CGRectMake(imageX, imageY, self.imageWidth, self.imageHeight)
        case .BottomRight:
            self.imageWidth = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0
            self.imageHeight = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0
            let imageX = self.referenceFrame.origin.x + self.referenceFrame.size.width - self.imageWidth
            let imageY = self.referenceFrame.origin.y + self.referenceFrame.size.height - self.imageHeight
            self.referenceFrame = CGRectMake(imageX, imageY, self.imageWidth, self.imageHeight)
        case .Redraw:
            self.imageWidth = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.width : 0
            self.imageHeight = self.referenceImageView.image != nil ? self.referenceImageView.image!.size.height : 0
            self.referenceFrame = self.referenceImageView.frame
        }
        
    }
    func centerScrollViewContents() {

    
    
    
    //MARK:- Layout Methods
    func setupUI() {
        
        self.backgroundView = UIView(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: self.view.frame.size.height))
