Skip to content

Commit c63d3ef

Browse files
committed
Make UIKit implementation agnostic of iOS/visionOS.
Signed-off-by: furby™ <devs@wabi.foundation>
1 parent 09bb095 commit c63d3ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/UIKitBackend/UIKitBackend+Passive.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extension UIKitBackend {
1515
case .leading:
1616
.natural
1717
case .trailing:
18-
UIScreen.main.traitCollection.layoutDirection == .rightToLeft ? .left : .right
18+
UITraitCollection.current.layoutDirection == .rightToLeft ? .left : .right
1919
}
2020
paragraphStyle.lineBreakMode = .byWordWrapping
2121

Sources/UIKitBackend/UIKitBackend.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public final class UIKitBackend: AppBackend {
7171
design: .default
7272
)
7373

74-
switch UIScreen.main.traitCollection.userInterfaceStyle {
74+
switch UITraitCollection.current.userInterfaceStyle {
7575
case .light:
7676
environment.colorScheme = .light
7777
case .dark:

0 commit comments

Comments
 (0)