             photoItem.enabled = false
         }
 
-        imageView.contentMode = .ScaleAspectFill
+        imageView.contentMode = .ScaleAspectFit
 
         view.sendSubviewToBack(imageView)
     }


    func generateMemedImage() -> UIImage {

        let topBarHeight = CGRectGetHeight((self.navigationController?.navigationBar.frame)!) + CGRectGetHeight(UIApplication.sharedApplication().statusBarFrame);
        let bottomBarHeight = CGRectGetHeight((self.navigationController?.toolbar.frame)!);
        let viewHeight = CGRectGetHeight(self.view.frame) - topBarHeight - bottomBarHeight
        let viewFrame = CGRectMake(0, topBarHeight, CGRectGetWidth(self.view.frame), viewHeight)

        // Render view to an image
        UIGraphicsBeginImageContext(view.frame.size)


    func keyboardWillShow(notification: NSNotification) {
        if bottomTextField.isFirstResponder() {
            view.frame.origin.y = -getKeyboardHeight(notification)
        }
    }

    func keyboardWillHide(notification: NSNotification) {
        view.frame.origin.y = 0
    }

    func getKeyboardHeight(notification: NSNotification) -> CGFloat {
