我是xcode的新手并且遇到了这个问题,因为在网上尝试了几个示例代码示例后,没有任何作用。
你能帮我弄清问题是什么吗?
我的代码如下:
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var Writingboard: UITextView!
@IBOutlet weak var Talkbutton: UIButton!
@IBAction func TalkbuttonTapped(_ sender: AnyObject){
Talkbutton.setTitle("Tap to Stop", for: .normal)
Writingboard.text="talking"
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
//Talkbutton.isEnabled=true
Writingboard.text="test the initializer"
}
}