Skip to content

Commit 6acdff5

Browse files
committed
wip
wip
1 parent 7165cad commit 6acdff5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Sources/IntrospectionView.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ struct IntrospectionView<Target: PlatformEntity>: PlatformViewControllerRepresen
115115
guard let target = selector(controller) else {
116116
return
117117
}
118+
#if canImport(UIKit)
119+
if let target = target as? UIViewController {
120+
controller.statusBarStyle = target.preferredStatusBarStyle
121+
}
122+
#endif
118123
context.coordinator.target = target
119124
customize(target)
120125
controller.handler = nil
@@ -146,6 +151,9 @@ struct IntrospectionView<Target: PlatformEntity>: PlatformViewControllerRepresen
146151
final class IntrospectionPlatformViewController: PlatformViewController {
147152
let id: IntrospectionViewID
148153
var handler: (() -> Void)? = nil
154+
#if canImport(UIKit)
155+
var statusBarStyle: UIStatusBarStyle?
156+
#endif
149157

150158
fileprivate init(
151159
id: IntrospectionViewID,
@@ -169,6 +177,10 @@ final class IntrospectionPlatformViewController: PlatformViewController {
169177
}
170178

171179
#if canImport(UIKit)
180+
override var preferredStatusBarStyle: UIStatusBarStyle {
181+
statusBarStyle ?? super.preferredStatusBarStyle
182+
}
183+
172184
override func viewDidLoad() {
173185
super.viewDidLoad()
174186
view.introspectionController = self

0 commit comments

Comments
 (0)