         captureButton = TriggerButton(frame: CGRect(x: (containerView.frame.width/2)-33, y: containerView.frame.height - 66 - 4, width: 66, height: 66))
         captureButton.layer.cornerRadius = 33
         captureButton.addTarget(self, action: Selector("capturePhotoTapped:"), forControlEvents: .TouchUpInside)
-        containerView.contentView.addSubview(captureButton)
+        if let containerView = containerView as? UIVisualEffectView {
+            containerView.contentView.addSubview(captureButton)
+        } else {
+            containerView.addSubview(captureButton)
+        }
         captureButton.enabled = false
 
         let closeButton = UIButton(frame: CGRect(x: captureButton.frame.maxX, y: captureButton.frame.midY - 22, width: view.bounds.width - captureButton.frame.maxX, height: 44))
         closeButton.addTarget(self, action: Selector("doneButtonTapped:"), forControlEvents: .TouchUpInside)
         closeButton.setTitle(NSLocalizedString("Done", comment: ""), forState: .Normal)
         closeButton.tintColor = UIColor.whiteColor()
-        containerView.contentView.addSubview(closeButton)
-
+        if let containerView = containerView as? UIVisualEffectView {
+            containerView.contentView.addSubview(closeButton)
+        } else {
+            containerView.addSubview(closeButton)
+        }
         let pickerButtonWidth: CGFloat = 114
         let pickerButton = UIButton(frame: CGRect(x: view.bounds.width - pickerButtonWidth - 12, y: 12, width: pickerButtonWidth, height: 38))
         pickerButton.setTitle(NSLocalizedString("Photos", comment: "Select from Photos buttont itle"), forState: .Normal)


        collectionView.backgroundColor = UIColor.clearColor()
        collectionView.alwaysBounceHorizontal = true
        containerView.contentView.addSubview(collectionView)
        collectionView.registerClass(PhotoCollectionViewCell.self, forCellWithReuseIdentifier: "PhotoCell")
        collectionView.dataSource = self
        collectionView.delegate = self

                insertedIndexPath = NSIndexPath(forItem: 0, inSection: 0)
            }
            self.collectionView.insertItemsAtIndexPaths([insertedIndexPath])
            }, completion: { finished in
                self.scrollToLastAddedAssetAnimated(true)
        })
    }

