title: How to grab other local tag data in Swift?
body: <p>I am working on saving data process,
  because my data is small, so I want to save in local data storage.
  I want a make time schedule.</p>
  
  <p>Because I have single 35 buttons and label(each buttons and label are paired), So I am using UIButton tag now. And I have a problem on using other local data "tag".</p>
  
  <p>I tired to make new func on global swift file(same swift file). but it is not able to call tag, because tag is only can use when UIbutton pressed.
  I want to use tag property on viewDidLoad(), not only in UIbuttonPressed.</p>
  
  <pre><code>override func viewDidLoad() {
          if let items = UserDefaults.standard.array(forKey: "SubjectList") as? [String] {
              subjectArray = items
              UITextLabel**1**.text = subjectArray**[1-1]**
              }
          } 
  
  @IBAction func buttonPressed(_ sender: UIButton) {
  
          var textField = UITextField() 
          let newItem = textField.text!        
          if sender.tag == 1{
              self.subjectArray[sender.tag-1] = newItem
              print("1")
          }
  UserDefaults.standard.set(self.subjectArray, forKey: "SubjectList") 
          }  
  
  </code></pre>