Swift Docs > Closures > Autoclosures 를 바탕으로 하고 있습니다. # Autoclosure 란 autoclosure는 함수에 argument로 전달되는 expression 을 감싸기 위해 자동으로 만들어지는 클로저 입니다. (An autoclosure is a closure that’s automatically created to wrap an expression that’s being passed as an argument to a function) 1) autoclosure 를 전달받고 싶으면, 파라미터 타입을 @autoclosure attribute 로 marking 하면 됩니다. 2) autoclosure는 argument 를 가지지 않으며 리턴값이 있어야합니다. 3)..
Swift Docs > Functions 을 읽다가 자주 혼용되는 용어들을 정확하게 잘 구분해서 쓰는 점이 인상깊었다. 나도 잘 리마인드해서 정확한 용어를 쓰도록 해야겠다. # parameter 와 argument parameter (매개변수) 는 함수의 정의에 포함되는 변수. argument (전달인자) 는 함수를 call 할 때 전달하는 실제값. 스택오버플로우의 이 설명이 가장 간단명료한 것 같아서 가져옴 - Parameter is variable in the declaration of function. - Argument is the actual value of this variable that gets passed to function. 아래는 Swift Docs > Functions 의 내용이다..
Xcode 13.2 로 iOS 15를 빌드했을 때, 발생하는 문제이다. (iOS 14 이하에서는 발생안함) # 이슈 cell을 토글하면 isSelected가 잘 토글되고 아래 코드도 잘 동작한다. class SomeCollectionViewCell: UICollectionViewCell { override var isSelected: Bool { willSet { if newValue { self.backgroundColor = .red } else { self.backgroundColor = .gray } } } ... } 하지만 사용자의 액션이 아니라 코드로 직접 isSelected 값을 바꾸면 순간적으로는 코드로 세팅해줬던 값으로 바뀌지만, 이전의 isSelected 값으로 다시 원복된다. 디버깅해..
Swift Docs > Concurrency 의 내용을 요약한 글로, 더 자세한 내용은 Meet Swift Concurrency 를 참고하시길 추천드립니다. [ 요약 ] # 개념 ✔️ Asynchronous Function - 일시중단될 수 있으며 그동안 다른 비동기 함수가 해당 스레드에서 실행될 수 있음. ✔️ Asynchronous Sequence - collection의 element를 하나씩 기다릴 수 있음. with for-await-loop ✔️ Asynchronous Function in parallel - 순차적 진행이 아니라 아니라 병렬로 작업을 진행할 수 있음. with async-let ✔️ Tasks and Task Groups - 비동기 코드의 우선순위, 취소 처리에 대해 더 많이..
Swift Docs > Strings and Characters 에 나오는 Unicode 관련 내용 입니다. (순서를 조금 재구성하였습니다) # Unicode Swift의 String과 Character는 유니코드를 완벽하게 준수합니다. 또한 세가지 유니코드 표현 (또는 문자열 인코딩) 에 접근할 수 있는 프로퍼티를 제공합니다. 1. UTF-8 Representation - A collection of UTF-8 code units - utf8 property 로 접근 가능. 프로퍼티 타입은 UTF8View (= collection of unsigned 8-bit (UInt8) values) 2. UTF-16 Representation - A collection of UTF-16 code units - ..
- Total
- Today
- Yesterday
- Django FCM
- PencilKit
- Watch App for iOS App vs Watch App
- flutter dynamic link
- 구글 Geocoding API
- flutter 앱 출시
- Flutter Text Gradient
- SerializerMethodField
- Dart Factory
- cocoapod
- ribs
- Django Heroku Scheduler
- METAL
- flutter build mode
- Sketch 누끼
- flutter deep link
- DRF APIException
- 장고 URL querystring
- 플러터 얼럿
- Flutter getter setter
- Flutter 로딩
- Flutter Clipboard
- 플러터 싱글톤
- ipad multitasking
- Python Type Hint
- drf custom error
- Flutter Spacer
- Django Firebase Cloud Messaging
- github actions
- 장고 Custom Management Command
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |