cs193p
Lecture 13: Publisher More Persistence
- publishers
- more persistence
0:39 Publisher
- what is publisher?
- what can we do with a Publisher?
- listening (subscribing) to a Publisher
- where do Publisher come from?
- URLSession
- Timer
- NotificationCenter
11:54 Code
35:28 More Persistence
cloudKit
API 使用
47:26 CoreData
API 使用
@ObservedObject
@FetchRequest
Lecture 14: Document Architecture
- App and Scene
- Document Architecture
- Components of a "document-oriented" app
App Architecture
App
protocol
Scene
protocol
- WindowGroup { }
- DocumentGroup(newDocument:) { }
- DocumentGroup(viewing:) { }
@SenceStorage
@AppStorage
@ScaledMetric
7:48 Code
app icon -> Asset.xcassets
19:56 RawRepresentable
每次開啟 app 後 load backgroundImage 完成又去 zoomToFit
28:02 Document Architecture
FileDocument
ReferenceFileDocument
UTType
Document Types
39:05 Undo
43:14 Back To Code
- 49:50 讓 ViewModel conform to
ReferenceFileDocument
- 1:02:16 undo imple
- 1:12:01 support document
cocoaError(.fileReadCorrup)