 
 
     func shareTapped(sender: UIBarButtonItem) {
-
         let image = generateMemedImage()
+        // Saves the meme.
+        memes.append(meme)
         let share = UIActivityViewController(activityItems: [image], applicationActivities: nil)
         presentViewController(share, animated: true, completion: nil)
     }

    }

    func textFieldDidEndEditing(textField: UITextField) {
        meme.topFieldText = ""
        meme.bottomFieldText = ""
        if textField.text?.utf8.count == 0 {
            if textField == topTextField {
                textField.text = topFieldDefaultValue

    ]

    var cancelItem: UIBarButtonItem!
    var meme = Meme(topFieldText: "", bottomFieldText: "", originalImage: nil, memeImage: nil)
    var memes: [Meme] = [Meme]()


    override func viewDidLoad() {
