     
     private lazy var popover: UIPopoverController = {
         [unowned self] in
-        return UIPopoverController(initWithContentViewController: self.imagePicker)
+        return UIPopoverController(contentViewController: self.imagePicker)
     }()
     
     private var actionSheet: UIActionSheet? = nil

extension FDTakeController : UIImagePickerControllerDelegate {
    public func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
        UIApplication.sharedApplication().statusBarHidden = true
        var mediaType: String = info[UIImagePickerControllerMediaType] as! String
        var imageToSave: UIImage
        // Handle a still image capture
        if mediaType == kUTTypeImage as String {

    public func dismiss() {
        if let actionSheet = self.actionSheet {
            actionSheet.dismissWithClickedButtonIndex(sources.count, animated: false)
        } else {
            imagePicker.dismissViewControllerAnimated(false, completion: nil)
        }
    }
}

extension FDTakeController : UIActionSheetDelegate {
    public func actionSheet(actionSheet: UIActionSheet, didDismissWithButtonIndex buttonIndex: Int) {
        let aViewController: UIViewController = self.topViewController(self.presentingViewController)
        if buttonIndex == actionSheet.cancelButtonIndex {
            self.didDeny?()
        } else {
