知识卡片
根状态组合各场景快照
SplitViewState以值结构组合文件夹导航栈、播放场景,以及可选的录制和文本弹窗状态。数组表达可重复层级,可选值表达场景有无;这让界面结构成为可存储数据。图中的节点均表示原书struct,不能据此推断底层UIKit对象也可直接序列化。
结构图:
classDiagram
class SplitViewState {
<<struct>>
+folderViews [FolderViewState]
+playView PlayViewState
+recordView RecordViewState?
+textAlert TextAlertState?
}
class FolderViewState {
<<struct>>
}
class PlayViewState {
<<struct>>
}
class RecordViewState {
<<struct>>
}
class TextAlertState {
<<struct>>
}
SplitViewState *-- "many" FolderViewState
SplitViewState *-- PlayViewState
SplitViewState *-- "0..1" RecordViewState
SplitViewState *-- "0..1" TextAlertState
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 06 探索实现
原书出处 · 1 处
- Model-View-Controller+ViewState · 查看原书依据
SplitViewState 中包含了一些嵌套的结构体值,用来指定 app 中不同组件的 view state: struct SplitViewState: Codable { var folderViews: [FolderViewState] var playVie
参考来源
- 位置:《App 架构》第06章《Model-View-Controller+ViewState》探索实现;来源项目book-sources,extracted/App 架构/_epub-src/text/part0008_split_002.html。
- 结论依据:原文给出SplitViewState:Codable的四个字段及类型。
- 原始内容:SplitViewState 中包含了一些嵌套的结构体值,用来指定 app 中不同组件的 view state: struct SplitViewState : Codable { var folderViews : [ FolderViewState ] var playVie