在Xcode Interface Builder或Storyboard中,可建立到输出口(IBOutlet)和操作(方法,IBAction)的连接. IBOutlet are for output Controls like Labels and TextFields, while IBAction are mostly for Objects like Buttons. 到 IBOutlet的连接可以实现在代码中引用和使用 UI 元素,如Label.TextBox等等: — 创建连接的方法(1…