title: Uploading data to Firebase with "IF" and UIPickerController
body: <p>I started coding a few weeks ago and I am trying to load data to my Firebase.database for my app. But the thing is, that I want the data to load/save into different folders/names ("A" &amp; "B") in my database in firebase so that later i can retrieve the data on 2 different scroll views with one scroll view only showing "A" and one only showing "B".</p>
  
  <p>My code is not throwing errors at me, but for some reason it won't upload data. i don't know why it is not working.</p>
  
  <p>Help highly appreciated.
  Thanks community !!</p>
  
  <p>Code incoming !</p>
  
  <hr>
  
  <p>/// Picker now</p>
  
  <pre><code>// 2 items for the picker.
  var data = ["A", "B"]
  
  func numberOfComponentsInPickerView(pickerView: UIPickerView) -&gt; Int {
      // Column count: use one column.
      return 1
  }
  
  func pickerView(pickerView: UIPickerView,
                  numberOfRowsInComponent component: Int) -&gt; Int {
  
      // Row count: rows equals array length.
      return data.count
  }
  
  func pickerView(pickerView: UIPickerView,
                  titleForRow row: Int,
                              forComponent component: Int) -&gt; String? {
  
      // Return a string from the array for this row.
      return data[row]
  }
  
  func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
      true
  }
  </code></pre>
  
  <hr>
  
  <pre><code>//Here I try to Upload the image that I picked in UIPickerView
  
  @IBAction func Upload(sender: UIButton){
  
      func simplePicker(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
  
          if component == 0 {
  
              func Upload(){
              _ = UIImage.self
              FIRDatabase.database().reference().childByAutoId().setValue("A")
              }}
  
          if component == 1 {
  
              func Upload(){
              _ = UIImage.self
              FIRDatabase.database().reference().childByAutoId().setValue("B")
              }}
  
  
      }
  
  }
  </code></pre>