 //
 
 import UIKit
+import Parse
 
 class SettingsViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
     

        let image = info[UIImagePickerControllerOriginalImage] as! UIImage
        
        // Do something with the images (based on your use case)
        self.profileImage.image = image
        
        // Dismiss UIImagePickerController to go back to your original view controller

        super.viewDidLoad()
        
        imgPicker.delegate = self
        //imgPicker.allowsEditing = true
        
        // Load existing user settings
        usernameTextField.text = currentUser?.username
        emailTextField.text = currentUser?.email
        if let imageFile = currentUser?.value(forKey: "profile_image") as? PFFile {
            imageFile.getDataInBackground(block: { (imgData: Data?, error: Error?) in
                if error == nil {
                    let userImage = UIImage(data: imgData!)
                    self.profileImage.image = userImage
                } else {
                    print(error?.localizedDescription)
                }
            })
        }
        profileImage.layer.cornerRadius = 3
    }
    
    override func viewDidAppear(_ animated: Bool) {
        
    }
    
    @IBAction func didTapProfileImageView(_ sender: Any) {
