How to clear the text field automatically
<p>I have a question about <code>UITextField()</code> in Swift. How can I clear the text in the text field when I click on it?</p>

<p>My <code>textField.text = "0"</code>. I want to automatically remove the number "0" when I click on the text field:</p>

<pre><code>import UIKit
class ViewController: UIViewController, UITextFieldDelegate {

    @IBOutlet var lbltext: UILabel!
    @IBOutlet var scrolview1: UIScrollView!
    @IBOutlet var fi: UITextField!
    @IBOutlet var scrolviewus: UIScrollView!
    @IBOutlet var counterLabel: UILabel!
    override func viewDidLoad() {
        super.viewDidLoad()
        fi.text = "0"
       }

       override func didReceiveMemoryWarning() {
         super.didReceiveMemoryWarning()
         // Dispose of any resources that can be recreated.
       }

       @IBAction func button(sender: AnyObject) {
        lbltext.numberOfLines = 0
        lbltext.text! = lbltext.text! + "\n" + fi.text! + "\n" + "---  "
    }
 }
</code></pre>