@@ -19,38 +19,37 @@ typealias _PlatformViewControllerRepresentable = UIViewControllerRepresentable
19
19
typealias _PlatformViewControllerRepresentable = NSViewControllerRepresentable
20
20
#endif
21
21
22
- @MainActor
23
22
protocol PlatformViewControllerRepresentable : _PlatformViewControllerRepresentable {
24
23
#if canImport(UIKit)
25
24
typealias ViewController = UIViewControllerType
26
25
#elseif canImport(AppKit)
27
26
typealias ViewController = NSViewControllerType
28
27
#endif
29
28
30
- @ MainActor func makePlatformViewController( context: Context ) -> ViewController
31
- @ MainActor func updatePlatformViewController( _ controller: ViewController , context: Context )
32
- @ MainActor static func dismantlePlatformViewController( _ controller: ViewController , coordinator: Coordinator )
29
+ func makePlatformViewController( context: Context ) -> ViewController
30
+ func updatePlatformViewController( _ controller: ViewController , context: Context )
31
+ static func dismantlePlatformViewController( _ controller: ViewController , coordinator: Coordinator )
33
32
}
34
33
35
34
extension PlatformViewControllerRepresentable {
36
35
#if canImport(UIKit)
37
- @ MainActor func makeUIViewController( context: Context ) -> ViewController {
36
+ func makeUIViewController( context: Context ) -> ViewController {
38
37
makePlatformViewController ( context: context)
39
38
}
40
- @ MainActor func updateUIViewController( _ controller: ViewController , context: Context ) {
39
+ func updateUIViewController( _ controller: ViewController , context: Context ) {
41
40
updatePlatformViewController ( controller, context: context)
42
41
}
43
- @ MainActor static func dismantleUIViewController( _ controller: ViewController , coordinator: Coordinator ) {
42
+ static func dismantleUIViewController( _ controller: ViewController , coordinator: Coordinator ) {
44
43
dismantlePlatformViewController ( controller, coordinator: coordinator)
45
44
}
46
45
#elseif canImport(AppKit)
47
- @ MainActor func makeNSViewController( context: Context ) -> ViewController {
46
+ func makeNSViewController( context: Context ) -> ViewController {
48
47
makePlatformViewController ( context: context)
49
48
}
50
- @ MainActor func updateNSViewController( _ controller: ViewController , context: Context ) {
49
+ func updateNSViewController( _ controller: ViewController , context: Context ) {
51
50
updatePlatformViewController ( controller, context: context)
52
51
}
53
- @ MainActor static func dismantleNSViewController( _ controller: ViewController , coordinator: Coordinator ) {
52
+ static func dismantleNSViewController( _ controller: ViewController , coordinator: Coordinator ) {
54
53
dismantlePlatformViewController ( controller, coordinator: coordinator)
55
54
}
56
55
#endif
0 commit comments