         super.didReceiveMemoryWarning()
         // Dispose of any resources that can be recreated.
     }
-
+    
+    func imagePickerControllerDidCancel(picker: UIImagePickerController) {
+        self.dismissViewControllerAnimated(true, completion: nil)
+        self.navigationController?.popToRootViewControllerAnimated(true)
+    }
 
     func imagePickerController(picker: UIImagePickerController!, didFinishPickingMediaWithInfo info:NSDictionary!) {
 

        }
        println("view stack= \(self.view)")
        
        let vc = self.storyboard?.instantiateViewControllerWithIdentifier("StoryfieldsVC") as StoryfieldsVC
        vc.url = "https://s3.amazonaws.com/theperspectiveapp/\(uploadRequest.key)"
        self.dismissViewControllerAnimated(true, completion: nil)
        self.navigationController?.pushViewController(vc, animated: true)
    }

    func createVideoParseObj(key: String) {
        var video = PFObject(className:"Video")
        video["url"] = "https://s3.amazonaws.com/theperspectiveapp/\(key)"

            imagePicker.mediaTypes = [kUTTypeMovie!]
            imagePicker.allowsEditing = true
            imagePicker.showsCameraControls = true
            self.presentViewController(imagePicker, animated: false, completion: nil)
        }
        else {
            println("Camera not available.")
