VisionOS App 직접 만들어보고 싶은데, Mac OS 14 beta 가 애플실리콘 밖에 없네요...😭 (download에도 download/all 에도 없음...없어..없어..) 저의 개인 맥이 인텔맥이여서 Mac OS 14 beta + Xcode 15 beta 조합을 할 수 없고... 그로 인해 우선 WWDC를 보면서 대충 정리를 해두고 언젠가 해보려고합니다... ---- > 헉 MacOS 13.4 에서도 Xcode 15 beta 가능합니다 🥹 ---- > 근데 Xcode 15.2 beta 에서 시뮬을 다운 못받는 군요 - VisionOS 문서 - WWDC > Spatial Computing 세션 모음 - Creating your first visionOS app - Interacting wit..
GridItem 을 만들 때 GridItem.Size 를 세팅해야한다. Size 옵션 중, 자주 헷갈리는 adaptive와 flexible 을 정리! public enum Size { /// A single item with the specified fixed size. case fixed(CGFloat) /// A single flexible item. /// /// The size of this item is the size of the grid with spacing and /// inflexible items removed, divided by the number of flexible items, /// clamped to the provided bounds. case flexible(minimu..
Swift-Collections 패키지가 나오고 다른 언어에는 있지만 Swift 에는 없어서 직접 구현해야했던 자료구조들 (deque, heap..) 이 제공되고 있다. [Swift Collections] deque 에 이어서 heap 을 살펴보자. 마찬가지로 이미 해당 자료구조를 내장 모듈로 제공하던 python 과 함께 살펴보자. [1] python 의 heap python은 heap 과 PriorityQueue (heap을 통해 구현) 를 모두 제공한다. # heap ✓ 파이썬의 heap은 min heap 이다. (min heap = 모든 부모 노드가 자식보다 작거나 같은 값을 갖는 이진 트리) ✓ 즉 모든 k에 대해 heap[k]
문서를 보면 Dictionary 의 subscript 로 세개가 구현되어있다. ✓ subscript(Key) -> Value? // get set ✓ subscript(Key, default _: () -> Value) -> Value // get set ✓ subscript(Dictionary.Index) -> Dictionary.Element // get 3번째처럼 key-based subscript 가 아니라 index-based subscript 도 있는 줄 몰랐는데, 정리해두자! [1] subscript(Key) -> Value? - 문서 - 코드 구현 var responseMessages = [200: "OK", 403: "Access forbidden", 404: "File not found..
[ 이 글에서 다루는 내용 ] - actor 의 등장배경 - actor - nonisolated - global actor - main actor [1] actor 가 나오기 전에는? 예전에는 data race가 발생할 수 있다면 lock 이나 queue 를 추가 구현해줘야했다. 대충 data race 가 발생할 수 있는 상황을 만들고, Thread Sanitizer 를 켜고 돌려보자. class UserManager { static let shared = UserManager() private(set) var userName = "" private init() {} func updateUserName(to name: String) { print(Thread.current) userName = name ..
Sendable 문서와 WWDC 22 > Eliminate data races using Swift Concurrency 를 조합해서 재구성한 내용입니다. [1] Sendable = safe to share Sendable 프로토콜은 concurrencey 상황에서 안전하게 공유될 수 있는 타입을 나타냅니다. 즉 우리는 하나의 concurrency domain (또는 isolation domain)에서 다른 domain으로 sendable type을 안전하게 pass 할 수 있습니다. (data race를 만들지 않고) [2] Sendable 을 채택할 수 있는 타입 1. Value Types frozen struct or enumeration. 아래 사진에 나오는 Chicken 은 class인데 이를 ..
[1] TaskGroup과 ThrowingTaskGroup ✓ TaskGroup : A group that contains dynamically created child tasks. (자세한 설명은 이 글 5번 참고) taskGroup을 만드려면 withTaskGroup(of:returning:body:) 를 호출. ✓ ThrowingTaskGroup : A group that contains throwing, dynamically created child tasks. throwing task group을 만드려면 withThrowingTaskGroup(of:returning:body:) 를 호출 [2] 사용예제 2.1 간단한 병렬 실행을 위해 async-let syntax 를 쓰다가 확장이 필요할 때 ..
[ 니즈 ] 이렇게 된 구성에서 1. SharedUI 안에 커스텀 폰트를 넣고 프리뷰로 커스텀 폰트를 보고 싶음. 2. SharedUI 를 의존하는 Feature1 타겟의 프리뷰로 커스텀 폰트를 보고 싶음. 3. 앱의 UIKit 기반 코드에서도 SharedUI의 커스텀 폰트를 쓰고 싶음. [ 작업 ] ~~ 귀여운 마루부리 폰트와 함께하는 예제 ~~ # 1. 폰트파일을 넣을 폴더를 원하는 경로에 만들고 Pacakge > resources 추가하기 // swift-tools-version: 5.5 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescript..
[1] task modifier - task(priority:_:) // Adds an asynchronous task to perform before this view appears. - task(id:priority:_:) // Adds a task to perform before this view appears or when a specified value changes. [2] 필요성 task modifier 가 나오기 전에는 뷰가 disappear 될 때 진행 중인 task 를 cancel 해주기 위해 어딘가에 (아래 예제는 뷰인데 보통 뷰모델) task 를 들고 있고 onDisappear 에서 cancel을 해줘야했음. struct SampleView: View { var body: some ..
WWDC 2016 Understanding Swift Performance 를 보다가 명확히 몰랐던 세가지를 알게 되었다. 1️⃣ final 키워드를 붙이면 컴파일이 빨라진다고 알고 있는데 이유가 뭘까? 2️⃣ uuid 필드를 String 타입 vs UUID 타입으로 들고 있는 것 중에 뭐가 더 좋은걸까? 3️⃣ 프로토콜과 달리 제네릭을 쓸 때는 구체타입을 왜 못바꿀까? [1] final 키워드 --- WWDC 세션 중 Method Dispatch 부분에 나오는 내용 ---- ✓ static dispatch: 컴파일 타임에 어떤 구현이 실행될 건지 알 수 있음 ✓ dynamic dispatch: 런타임에 어떤 구현이 실행될 건지 알 수 있음 static dispatch 인 경우, 컴파일러는 여러 기법 (..
- Total
- Today
- Yesterday
- ipad multitasking
- Flutter 로딩
- SerializerMethodField
- 장고 Custom Management Command
- flutter 앱 출시
- Flutter Text Gradient
- cocoapod
- DRF APIException
- 플러터 싱글톤
- Python Type Hint
- 플러터 얼럿
- METAL
- Flutter Clipboard
- Watch App for iOS App vs Watch App
- Flutter getter setter
- ribs
- flutter deep link
- PencilKit
- 구글 Geocoding API
- flutter build mode
- drf custom error
- github actions
- flutter dynamic link
- Django FCM
- Sketch 누끼
- 장고 URL querystring
- Dart Factory
- Django Heroku Scheduler
- Django Firebase Cloud Messaging
- Flutter Spacer
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
31 |