[코딩] 배우는것/SwiftUI
[SiwftUI] @escaping
JabCho
2020. 7. 23. 02:52
728x90
반응형
SMALL
@escaping
A closure is said to escape a function when the closure is passed as an argument to the function, but is called after the function returns.
클로저는 함수에 argument(인자)로 전달되었지만, 함수가 리턴 된 후 실행될 때 함수를 escape한다.
escape 란 '탈출' 이라는 뜻이 아니라, 함수 외부로 보낼 수 있다는 뜻으로 쓰인다.
함수를 호출하는 도중에 해당 함수 외부에 클로저를 저장하기 위해서는 클로저는 escaping closure여야 한다.
hcn1519.github.io/articles/2017-09/swift_escaping_closure
Swift Escaping Closure 이해하기
Swift의 Escaping Closure에 대해 알아봅니다.
hcn1519.github.io
728x90
반응형
LIST