     @IBOutlet weak var searchFriends: UISearchBar!
     @IBOutlet weak var submit: UIButton!
     var url: String!
+    var toUser: String!
 
     @IBOutlet weak var txtIncompleteFieldsMessage: UILabel!
     
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        // Do any additional setup after loading the view.
+    }
+    
+    override func didReceiveMemoryWarning() {
+        super.didReceiveMemoryWarning()
+        // Dispose of any resources that can be recreated.
+    }
+    
+    override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
+        theme.endEditing(true)
+        numOfClips.endEditing(true)
+    }
     
     @IBAction func submitPerspectiveFields(sender: AnyObject) {
         var themeEntered = theme.text
         var numOfClipsEntered = numOfClips.text.toInt()
         
         func createPerspective(){
-            var currentUser = PFUser.currentUser()
-            
             var perspective = PFObject(className: "Perspective")
             perspective["theme"] = themeEntered
             perspective["numOfClips"] = numOfClipsEntered
             perspective["collaborators"] = [PFUser.currentUser().username]
             perspective["videos"] = [url]
-//            perspective.addUniqueObjectsFromArray([url], forKey:"videos")
             
             perspective.saveInBackgroundWithBlock {
                 (success: Bool, error: NSError!) -> Void in
                 if (success) {
+                    var perspectiveId = perspective.objectId
+                    self.createNotification(perspectiveId)
                     println("Sucessfully saved Perspective")
                 } else {
                     println("Perspective did not save")

     
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        println("the url is: \(self.url)")
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    func textFieldShouldReturn(textField: UITextField) -> Bool {

        return true;
    }
    


    /*
    // MARK: - Navigation
