title: Issue setting default profile pic in Swift (iOS)
body: <p>I am new to Swift/iOS development, so this might be a stupid question, but I can't seem to find how to do this correctly. </p>
  
  <p>I am following a youtube guide on how to programmatically code (no storyboard) a login screen in Swift and register a user into a Firebase database. The basic outline of the design are as follows </p>
  
  <p><a href="https://i.stack.imgur.com/il11J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/il11J.png" alt="enter image description here"></a></p>
  
  <p>Once the user clicks the icon of the <strong>cat with the crown</strong>, the image picker comes up and they can select a profile picture and then register like normal. If the user does not select an image from the picker, the <strong>cat with the crown</strong> icon gets loaded as the profile picture by default. </p>
  
  <p>What I have been trying to do is make it so a different picture (not the cat, and not shown to the user on the login page) named <strong>"nedstark"</strong> is set as the default profile picture that is stored in the database. </p>
  
  <p>The program uses LoginController.swift and LoginController + handlers.swift files to make this happen. I tried to add a conditional to the picker where if nothing is selected, the default profile pic is set to a specific default user pic (different than the cat), but it doesn't work. </p>
  
  <p><strong>This is the code that stores the photo and other User info into the Database</strong></p>
  
  <pre><code>            let imageName = NSUUID().uuidString
          let storageRef = Storage.storage().reference().child("profile_images").child("\(imageName).jpg")
  
          if let profileImage = self.profileImageView.image, let uploadData = UIImageJPEGRepresentation(profileImage, 0.1) {
  
              storageRef.putData(uploadData, metadata: nil, completion: { (metadata, error) in
  
                  if let error = error {
                      print(error)
                      return
                  }
  
                  if let profileImageUrl = metadata?.downloadURL()?.absoluteString {
  
                      let values = ["name": name, "email": email, "profileImageUrl": profileImageUrl]
  
                      self.registerUserIntoDatabaseWithUID(uid, values: values as [String : AnyObject])
                  }
              })
          }
  </code></pre>
  
  <p><strong>This is the code where I am trying to set the default profile pic</strong></p>
  
  <pre><code>func handleSelectProfileImageView() {
      let picker = UIImagePickerController()
  
      picker.delegate = self
      picker.allowsEditing = true
  
      present(picker, animated: true, completion: nil)
  }
  
  func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
  
      var selectedImageFromPicker: UIImage?
  
      if let editedImage = info["UIImagePickerControllerEditedImage"] as? UIImage {
          selectedImageFromPicker = editedImage
      } else if let originalImage = info["UIImagePickerControllerOriginalImage"] as? UIImage {
          selectedImageFromPicker = originalImage
      }
      else {  //Testing if default profile pic set
          selectedImageFromPicker = UIImage(named: "nedstark")
      }
  
      if let selectedImage = selectedImageFromPicker {
          profileImageView.image = selectedImage
      }
      else {  //Testing if default profile pic set
          profileImageView.image = UIImage(named: "nedstark")
      }
      dismiss(animated: true, completion: nil)
  
  }
  </code></pre>
  
  <p>I 
  I know that this is a total noob question, but any help, tips, or pointers is greatly appreciated. Thanks! </p>