본문 바로가기

Programming/Swift

IBAction and IBOutlet

@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.

 

www.hackingwithswift.com/read/2/5/from-outlets-to-actions-creating-an-ibaction#:~:text=%40IBAction%20is%20similar%20to%20%40IBOutlet,will%20be%20calling%20the%20method.

 

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