Collection 문서를 보면 Time Complexity 가 두개로 나온 부분이 많은데요, 예를들어 1) randomElement() 2) distance(from:to:) 3) count ✓ RandomAccessCollection = 효율적인 random-access index 순회를 지원하는 콜렉션 ✓ BidirectionalCollection = 양방향 (forward, backward) 순회를 지원하는 콜렉션 이렇게 두개의 콜렉션이 있는데, Expected Performance 에 잘 나와있는 것 처럼 bidirectional collection 는 전체 collection 을 순회해서 카운팅 해야하므로 O(1) 의 시간복잡도를 가질 수 없기 때문입니다. 각 콜렉션 문서에서도 차이를 잘 볼 ..
StoreKit Configuration File 의 기본 priceLocale 는 USD로 되어있다. 이걸 바꾸는 법을 알아보자. 참고로 Setting up StoreKit testing in Xcode 문서에 안나와있어서 이 글을 보고 알게됨! (wwdc 어딘가에 나와있을 것 같음) 파일 내부에 해당 세팅이 없고 다음과 같이 Editor 를 통해 변경한다. StoreKit Configuration File 선택 > Editor > DefaultStorefront 변경 그러면 StoreKit Configuration 아이템들의 price가 원화로 바뀌고 테스트 코드에서도 fetch 해온 product의 priceLocal / price가 원화기준으로 바뀐다. 이제 앱스토어커넥트에서 원화 기준으로 상품 ..
과거에 Continuations 를 이용해서 짰던 코드를 보는데 헷갈렸다.. @)@ 리마인드가 필요하군 우선 요 목차(?)가 머릿 속에 있어야한다. [1] 용어 기억 가끔 용어도 잘 생각이 안날 때가 있다,, [ Continuation ] 비동기 코드를 래핑해서 연속(continuation)을 만든다! 라고 기억하자 문서에서는 이렇게 표현한다. To create a continuation in asynchronous code, call the withUnsafeContinuation(function:_:) or withUnsafeThrowingContinuation(function:_:) function. [ CheckedContinuation vs UnsafeContinuation ] 잘 까먹는 주요원..
[SwiftUI] @Observable 매크로 (1) 에서 이어집니다. [ 요약 ] # 1. 예전에 뷰에서 썼던 프로퍼티 래퍼 @State, @Binding, @ObservedObject, @StateObject, @EnvironmentObject, @Enviroment iOS 17+ 부터는 4개만 쓰면 됨 @State, @Binding, @Bindable (NEW), @Enviroment # 2. ObservableObject 가 Observale 매크로로 대체되고 뷰에서 프로퍼티 래퍼로 쓰던 것은 다음과 같이 매핑됨 ✓ @ObservedObject ----> 안써도 됨 ㄴ 하지만 텍스트 필드처럼 Binding을 넘겨줘야하는 경우는 @Bindable ✓ @StateObject ----> @State ✓..
Swift 5.9 부터 Observable macro 를 사용할 수 있습니다. ✓ WWDC 23 > Discover Observation in SwiftUI ✓ Managing model data in your app / Migrating from the Observable Object protocol to the Observable macro ✓ Observation ✓ 구현 코드 WWDC 만 보면 채워지지 않는 구멍이 정말 많습니다 .. 🙄 문서를 같이 보길 추천드립니다. 또한 Xcode 15 beta 5 에서 @Observable 을 사용하면 컴파일 에러가 납니다 저는 이거 보고 Xcode 앱 이름에 공백제거하고 컴파일 성공했음! https://developer.apple.com/forums/thr..
- Total
- Today
- Yesterday
- PencilKit
- Flutter 로딩
- Sketch 누끼
- flutter dynamic link
- METAL
- Watch App for iOS App vs Watch App
- Flutter Spacer
- Flutter Text Gradient
- flutter build mode
- SerializerMethodField
- flutter deep link
- ribs
- 플러터 싱글톤
- Django Firebase Cloud Messaging
- ipad multitasking
- 장고 URL querystring
- 플러터 얼럿
- Flutter Clipboard
- DRF APIException
- Python Type Hint
- flutter 앱 출시
- 장고 Custom Management Command
- cocoapod
- github actions
- Django Heroku Scheduler
- 구글 Geocoding API
- Django FCM
- Flutter getter setter
- Dart Factory
- drf custom error
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |