     @IBAction func share(sender: AnyObject) {
         let activityViewController = UIActivityViewController(activityItems: [generateMemedImage()],
             applicationActivities: nil)
-        self.presentViewController(activityViewController, animated: true, completion: nil)
+        presentViewController(activityViewController, animated: true, completion: nil)
         
         // save the meme only if shared
         activityViewController.completionWithItemsHandler = {(activity, success, items, error) in {

    func generateMemedImage() -> UIImage {
        
        // Hide toolbar and navigation bar
        self.navigationBar.hidden = true
        self.toolbar.hidden = true
        
        // Render view to an image
        UIGraphicsBeginImageContext(self.view.frame.size)
        self.view.drawViewHierarchyInRect(self.view.frame, afterScreenUpdates: true)
        let memedImage : UIImage = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        
        // Show toolbar and navigation bar
        self.navigationBar.hidden = false
        self.toolbar.hidden = false
        
        return memedImage
    }

        let pickerController = UIImagePickerController()
        pickerController.delegate = self
        pickerController.allowsEditing = true
        presentViewController(pickerController, animated: true, completion: nil)
    }
    
    // Access the photo album
