Jas*_*ore 14 interface-builder xcode-storyboard swift
将Swift代码挂钩到Storyboard时,如何添加IBAction
和IBOutlet
标记?
Jas*_*ore 31
添加IBAction
和IBOutlet
属性到变量和函数,以便它们可以在"界面"构建器中可见.
class ViewController: UIViewController {
@IBOutlet var label: UILabel?
@IBAction func doTap(x:UIButton) {
println("Tapped: \(x)")
}
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
30694 次 |
最近记录: |