diff --git a/examples/interop/ios-compose-in-uikit/iosApp/iosApp/AppDelegate.swift b/examples/interop/ios-compose-in-uikit/iosApp/iosApp/AppDelegate.swift index 694d4356ef..f42b898286 100644 --- a/examples/interop/ios-compose-in-uikit/iosApp/iosApp/AppDelegate.swift +++ b/examples/interop/ios-compose-in-uikit/iosApp/iosApp/AppDelegate.swift @@ -46,7 +46,13 @@ class UIKitViewController: UIViewController { label.textAlignment = .center label.numberOfLines = 0 view.addSubview(label) - view.backgroundColor = .lightGray + view.backgroundColor = UIColor { collection in + switch collection.userInterfaceStyle { + case .light: return UIColor.white + case .dark: return UIColor.black + default: return UIColor.white + } + } NSLayoutConstraint.activate([ label.centerYAnchor.constraint(equalTo: self.view.centerYAnchor),