Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- Protocol
- swift documentation
- 애니메이션
- rxswift
- UICollectionView
- Refactoring
- ribs
- 스위프트
- 리펙토링
- ios
- 리펙터링
- MVVM
- combine
- Observable
- Human interface guide
- clean architecture
- HIG
- Clean Code
- tableView
- uitableview
- 리팩토링
- Xcode
- collectionview
- SWIFT
- RxCocoa
- map
- UITextView
- swiftUI
- uiscrollview
- 클린 코드
Archives
- Today
- Total
목록Closure Expression (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift 공식 문서] 7. Closure (클로저)
Closure Closure(폐쇄): 클로저는 코드에서 전달 및 사용할 수 있는 2가지의 자체 기능을 가진 블록 정의된 컨텍스트에서 모든 상수 및 변수에 대한 참조를 캡쳐하고 저장 가능 캡쳐: 자신의 블록 외부에 있는 값을 참조하는 것 // ex) 캡쳐: incrementer() 함수 블록에서 runningTotal과 amount인수를 참조 func makeIncrementer(forIncrement amount: Int) -> () -> Int { var runningTotal = 0 func incrementer() -> Int { runningTotal += amount return runningTotal } return incrementer } Closure는 실행 순서 제어가능 클로저는 호출할 ..
swift 공식 문서
2021. 6. 24. 00:59