         
         imageView = UIImageView(frame: bounds)
         imageView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]
-        imageViewContentMode = .ScaleAspectFit
+        imageView.contentMode = .ScaleAspectFit
         scrollView.addSubview(imageView)
         
         toggleZoomRecognizer = UITapGestureRecognizer(target: self, action: #selector(toggleScale))

    }
    
    func scrollViewDidZoom(scrollView: UIScrollView) {
        let imageViewSize = imageView.currentImageSize()
        let scrollViewSize = scrollView.bounds.size
        
        if scrollView.zoomScale > 1 {
            let scrollViewContentSize = CGSizeMake(max(imageViewSize.width, scrollViewSize.width),
                                                   max(imageViewSize.height, scrollViewSize.height))
            scrollView.contentSize = scrollViewContentSize
            imageView.center = CGPointMake(scrollViewContentSize.width/2,
                                           scrollViewContentSize.height/2)
        } else {
            scrollView.contentSize = scrollViewSize
            imageView.center = CGPointMake(scrollView.bounds.width / 2, scrollView.bounds.height/2)
        }
    }
}

            }
        }
    }
}

//MARK: Private
