
[1] @TaskLocal 이란 ? @TaskLocal 은 특정 Task 와 Child Tasks 들끼리 값을 공유할 수 있게 해주는 프로퍼티 래퍼입니다. 이 값은 특정 Task 랑 Child Tasks 에만 국한되어서 전파됩니다. 즉 상위 Task 및 다른 독립적인 Task 에는 영향을 주지 않습니다. @TaskLocal 를 통해 전역상태를 피하면서도, 관련된 작업들 간에 상태를 안전하게 공유할 수 있습니다. [2] TaskLocal 선언하기 static 이나 global 프로퍼티로 선언되어야합니다. (global 은 Swift 6 이상부터 가능하다고 하네요) [3] TaskLocal 에 값을 바인딩 하기 task-local 에 직접적으로 value 를 set 할 수 없습니다. ..
Layout 프로토콜을 채택해서 Custom Layout 을 주로 만들지만 (문서, 예제 - WheelLayout )이 글처럼 SizeLogger 를 만들 수도 있다. 좋은 아이디어! struct SizeLogger: Layout { let label: String func sizeThatFits(proposal: ProposedViewSize, subviews: Subviews, cache: inout ()) -> CGSize { let result = subviews[0].sizeThatFits(proposal) print(label, proposal, result) return result } func placeSubview..

iOS 17 부터 scrollClipDisabled 모디파이어를 쓸 수 있다. ScrollView 는 기본적으로 contents 를 scrollView bounds 에 맞게 clip 하기 때문에ScrollView 안에 들어가는 뷰에 shadow 를 주면 짤리게 된다.그 때 이 모디파이어를 사용해서 shadow 를 안짤리게 할 수 있다. [ 문서에 나오는 예제 ] scrollClipDisabled > true (디폴트값) scrollClipDisabled > false [ 하위버전 ] 그럼 하위버전에서는 어떻게 shadow 가 안짤리게 할까 ? ScrollView 자체에 shadow 를 주면 된다. (동일하게 동작함) ScrollView(.horizontal) { ..

Timer 쓸 때, 편하게 썼던 autoconnect 는 ConnectablePublisher 의 메소드이다. ConnectablePublisher 에 대해 자세히 알아보자. [1] ConnectablePublisherConnectablePublisher 는 connection 을 명확히 지정할 수 있는 publisher 이다. 즉 connect 메소드를 직접 호출하기 전까지 값을 방출하지 않는다. 값이 방출되기 전에 추가적인 configuration 이나 setup 이 필요할 때,구독자들이 다 준비된 후 이벤트를 방출하고 싶을 때유용하다. autoconnect 는 connection , disconnection 을 자동으로 해주는 메소드이다. [2] ConnectablePublisher..
TCA 를 보다가 context 를 live, preview, test 로 구분하는 것을 봤다. ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1"이면 프리뷰 빌드인 지 알 수 있다고 한다. (참고) [ TCA 코드 ]https://github.com/pointfreeco/swift-dependencies/blob/2ee34c93c717700eb58ab945fd0444cebe8a646f/Sources/Dependencies/DependencyValues.swift#L304 swift-dependencies/Sources/Dependencies/DependencyValues.swift at 2ee34c93c717700eb..
- Total
- Today
- Yesterday
- Django Firebase Cloud Messaging
- flutter build mode
- Flutter Text Gradient
- Flutter Spacer
- DRF APIException
- Sketch 누끼
- Watch App for iOS App vs Watch App
- Flutter 로딩
- cocoapod
- ipad multitasking
- Flutter Clipboard
- 장고 URL querystring
- 플러터 얼럿
- 장고 Custom Management Command
- SerializerMethodField
- github actions
- 플러터 싱글톤
- METAL
- flutter deep link
- Python Type Hint
- Flutter getter setter
- Django FCM
- Dart Factory
- flutter 앱 출시
- ribs
- drf custom error
- flutter dynamic link
- Django Heroku Scheduler
- 구글 Geocoding API
- PencilKit
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |