             }
         }
         PHPhotoLibrary.sharedPhotoLibrary().registerChangeObserver(self)
-        setFrames()
-        if !dismissOnTap {
-            pickerContainer.layer.shadowOpacity = 0.0
-        }
+        initCamera()
     }
     
-    private func setFrames() {
-        let ss = ImagePickerViewController.screenSize
-        pickerContainer.frame = CGRect(x: 0, y: ss.height, width: ss.width, height: pickerHeight)
-        collectionView.collectionViewLayout.invalidateLayout()
-        collectionView.frame = CGRect(x: 0, y: 0, width: ss.width, height: pickerHeight)
-        (collectionView.collectionViewLayout as! UICollectionViewFlowLayout).estimatedItemSize = CGSize(width: ImagePickerViewController.expectedCellWidth, height: pickerHeight)
+    override public var frame: CGRect {
+        didSet {
+            collectionView.collectionViewLayout.invalidateLayout()
+            collectionView.frame = CGRect(x: 0, y: 0, width: frame.width, height: frame.height)
+            (collectionView.collectionViewLayout as! UICollectionViewFlowLayout).estimatedItemSize = CGSize(width: ImagePickerViewController.expectedCellWidth, height: frame.height)
+        }
     }
 
     private func fetchImageAssets() {

    func didSelectImage(image: UIImage)
}

public class ImagePickerViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout, UIImagePickerControllerDelegate, UINavigationControllerDelegate, PHPhotoLibraryChangeObserver {

    private static let screenSize = UIScreen.mainScreen().bounds.size
    private static let expectedCellWidth: CGFloat = 240

        cv.backgroundColor = ImagePickerViewController.bgColor
        return cv
    }()

    ///////////////////////////////////////
    //  CollectionView
