I would like my code to simply display a label if and only if there is text in the textfiled if there is no text the label should be hidden. Thats it. My code below does not do what I have described above.

```
   import UIKit
class ViewController: UIViewController {

  @IBOutlet var label: UILabel!
  @IBOutlet var txtfield: UITextField!
 override func viewDidLoad() {
super.viewDidLoad()
appear()

  }
   func appear() {

if (txtfield.text?.isEmpty)! {
    label.isHidden = true

}
else {
    label.isHidden = false
}}}

```