title: How exactly would my alert controller action append text to a label?
body: <p>Basically, i have an alert controller set up so that when i click a button in the view controller, an alert controller pops up and i can type words into a textfield, click an &quot;OK&quot; button.</p>
  <p>Reference image</p>
  <p><a href="https://i.stack.imgur.com/OchKr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OchKr.png" alt="alert sample" /></a><br />
  <sub>(source: <a href="https://ashfurrow.com/img/import/blog/uialertviewcontroller-example/9EA0E4E86AB54891A9A27BC24D1C8889.png" rel="nofollow noreferrer">ashfurrow.com</a>)</sub></p>
  <p>and it inserts that text into a label in the view controller. Ive extended this ability so that i can have preset keywords (like &quot;Good,&quot; &quot;Likely&quot; and &quot;Almost&quot;) that i can select from in the alert controller to speed up the typing process, as these words are typed a lot in my app. which is shown in the below image</p>
  <p><img src="https://i.imgur.com/3cwvnJg.png" alt="Sample" />.</p>
  <p>I was wondering if you could also add those key words that I've selected to whatever is in the label? Every time i try to click a preset keyword to add to the label, it erases whatever was already in the label.</p>
  <p>Specifically, whatever text that is already in my label, can i select a preset keyword to append to whats in the label?</p>
  <p>This is what i have so far, for the second image:</p>
  <pre><code>//Editable Text Box with Preset Keywords
  
  @IBOutlet weak var UselessLabel: UILabel!
  
  @IBAction func UselessTapped(_ sender: UIButton) {
      print(&quot;Useless Button Tapped&quot;)
      openUselessAlert()
  
  }
  
  func openUselessAlert() {
      
      //Create Alert Controller
      let alert9 = UIAlertController (title: &quot;Uselss:&quot;, message: nil, preferredStyle: UIAlertControllerStyle.alert)
      
      //preset keyword as button in alert controller
      let bt1 = UIAlertAction(title: &quot;Good&quot;, style: UIAlertActionStyle.default){
          (action) in self.UselessLabel.text = &quot;Good&quot;}
      
      alert9.addAction(bt1)
      
      //preset keyword as button in alert controller
      let bt2 = UIAlertAction(title: &quot;Likely&quot;, style: UIAlertActionStyle.default){
          (action) in self.UselessLabel.text = &quot;Likely&quot;}
      
      alert9.addAction(bt2)
      
      //preset keyword as button in alert controller
      let bt3 = UIAlertAction(title: &quot;Almost&quot;, style: UIAlertActionStyle.default){
          (action) in self.UselessLabel.text = &quot;Almost&quot;}
      
      alert9.addAction(bt3)
      
      //Create Cancel Action
      let cancel9 = UIAlertAction(title: &quot;CANCEL&quot;, style: UIAlertActionStyle.cancel, handler: nil)
      
      alert9.addAction(cancel9)
  
      
      //Create OK Action
      let ok9 = UIAlertAction(title: &quot;OK&quot;, style: UIAlertActionStyle.default) { (action: UIAlertAction) in print(&quot;OK&quot;)
          let textfield = alert9.textFields?[0]
          print(textfield?.text!)
          self.UselessLabel.text = textfield?.text!
      }
      
      alert9.addAction(ok9)
      
      //Add Text Field
      alert9.addTextField { (textfield: UITextField) in
      textfield.text = self.UselessLabel.text           
  
      textfield.placeholder = &quot;Useless&quot;
      }
      
      //Present Alert Controller
      self.present(alert9, animated:true, completion: nil)
  }
  </code></pre>
  <p>Please help! How exactly would you do this in swift 3?</p>