@IBAction is similar to @IBOutlet , but goes the other way: @IBOutlet is a way of connecting code to storyboard layouts, and @IBAction is a way of making storyboard layouts trigger code. This method takes one parameter, called sender . It's of type UIButton because we know that's what will be calling the method.
From outlets to actions: creating an IBAction - a free Hacking with Swift tutorial
Was this page useful? Let us know! 1 2 3 4 5
www.hackingwithswift.com
'Programming > Swift' 카테고리의 다른 글
Class: UIControl (0) | 2020.10.14 |
---|---|
Difference between viewdidappear and viewwillappear in swift (0) | 2020.10.14 |
Storyboard 추가하기 (0) | 2020.10.14 |
mutating (0) | 2020.10.13 |
Properties and Methods (0) | 2020.10.13 |