File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Sources/OpenSwiftUI/Internal/Test Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ //
2
+ // TestIDView.swift
3
+ // OpenSwiftUI
4
+ //
5
+ // Created by Kyle on 2023/1/9.
6
+ // Lastest Version: iOS 15.5
7
+ // Status: WIP
8
+
9
+ internal import OpenGraphShims
10
+
11
+ struct TestIDView < Content, ID> : PrimitiveView , UnaryView {
12
+ var content : Content
13
+ var id : ID
14
+
15
+ init ( content: Content , id: ID ) {
16
+ self . content = content
17
+ self . id = id
18
+ }
19
+
20
+ static func _makeView( view: _GraphValue < TestIDView < Content , ID > > , inputs: _ViewInputs ) -> _ViewOutputs {
21
+ // Use IdentifiedView here
22
+ fatalError ( " TODO " )
23
+ }
24
+ }
25
+
26
+ // TODO
27
+ extension TestIDView {
28
+ struct IdentifiedView {
29
+ @Attribute
30
+ var view : TestIDView
31
+ var id : ID ?
32
+ }
33
+ }
34
+
35
+ extension View {
36
+ func testID< ID: Hashable > ( _ id: ID ) -> some View {
37
+ TestIDView ( content: self , id: id)
38
+ }
39
+ }
You can’t perform that action at this time.
0 commit comments