File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Sources/OpenSwiftUI/AppStructure/AppOrganization/internal Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ //
2
+ // TestApp.swift
3
+ // OpenSwiftUI
4
+ //
5
+ // Created by Kyle on 2024/1/9.
6
+ // Lastest Version: iOS 15.5
7
+ // Status: WIP
8
+ // ID: A519B5B95CA8FF4E3445832668F0B2D2
9
+
10
+ public struct _TestApp {
11
+ public init ( ) {
12
+ fatalError ( " TODO " )
13
+ }
14
+ public func run( ) -> Never {
15
+ fatalError ( " TODO " )
16
+ }
17
+ }
18
+
19
+ extension _TestApp {
20
+ struct RootView : View {
21
+ @State
22
+ var state : StateType
23
+
24
+ init ( ) {
25
+ fatalError ( " TODO " )
26
+ }
27
+
28
+ var body : some View {
29
+ state. testView
30
+ fatalError ( " TODO " )
31
+ }
32
+ }
33
+
34
+ }
35
+
36
+ extension _TestApp . RootView {
37
+ struct StateType {
38
+ var id : Int
39
+ var testView : AnyView
40
+
41
+ mutating func setTestView< V: View > ( _ view: V ) {
42
+ id += 1
43
+ testView = AnyView ( view. testID ( id) )
44
+ }
45
+ }
46
+ }
You can’t perform that action at this time.
0 commit comments