title: Why is Optional("Text") - Swift
body: <p>I just started with Swift. So I created a simple application with a label, button and a text field. When you click the button, the app has to change the label with the text of the text field. </p>
  
  <pre><code>class ViewController: UIViewController {
      @IBOutlet weak var textLabel: UILabel!
      @IBOutlet weak var textField: UITextField!
  
      @IBAction func updateButton(sender: UIButton) {
          textLabel.text = "Hi \(textField.text) "
      }
  </code></pre>
  
  <p>The result is</p>
  
  <blockquote>
    <p>Hi Optional("TextOfTextField")</p>
  </blockquote>
  
  <p>Okay. So it's a very simple question. </p>
  
  <p>I hope someone can help me.</p>
  
  <p><a href="https://i.stack.imgur.com/To0Kl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/To0Kl.png" alt="enter image description here"></a></p>