标签:out field cti view pre info weak play world
看图
下面附上代码import UIKit
class ViewController: UIViewController {
@IBOutlet weak var display: UITextField!
@IBAction func xianshi(_ sender: UIButton) {
display.text="HelloWorld"
}
@IBAction func qingkong(_ sender: UIButton) {
display.text=" "
}
}
最后看模拟器效果图
标签:out field cti view pre info weak play world
原文地址:https://www.cnblogs.com/xubaby0912/p/12398409.html