title: How to insert data to a textfield that goes to an empty array and in turn displays in a label?
body: <p>I found this ready code that prints out an already stored array called (let dataArr = ["25","51","57","73","68"]) in rows into a label.
   I have now made a text field that can insert to another array(my array = String) I want this array  to be swaped with the first array.</p>
  
  <p>But know when I swap to empty array that has already been populated via a text field it doesn’t appear in label.</p>
  
  <p>I was hoping to swap the dataArr to an empty array called array that files up with data when inserted via the text field but for reason when I am doing that it doesn’t get shown in the label I am posting now to see what I am doing wrong.</p>
  
  <p>But when I print the array it appears in the console but not in the label.</p>
  
  <pre><code>let dataArr = ["2,5","5,1","5,7"]
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
      view.backgroundColor = .yellow
      var yPos = 90
      for i in 0..&lt;dataArr.count {
          let element = dataArr[i]
          let labelNum = UILabel()
  
  
  
          let num1Nnum2 = "number 1   : \(element)"
          labelNum.text = num1Nnum2
          labelNum.textAlignment = .center
          labelNum.frame = CGRect( x:10, y:yPos, width:250, height: 80)
          yPos += 80
          self.view.addSubview(labelNum)
  
      }
  
  }
  
  
  var array = [String]()
  
  override func viewDidLoad() {
      super.viewDidLoad()
      view.backgroundColor = .yellow
      var yPos = 90
      for i in 0..&lt;array.count {
          let element = array[i]
          let labelNum = UILabel()
  
  
          let num1Nnum2 = "number 1   : \(element)"
          labelNum.text = num1Nnum2
          labelNum.textAlignment = .center
          labelNum.frame = CGRect( x:10, y:yPos, width:250, height: 80)
          yPos += 80
          self.view.addSubview(labelNum)
  
      }
  
  }
  </code></pre>