@@ -249,6 +249,26 @@ open class StateViewController<State: Equatable>: UIViewController {
249
249
endStateTransitionIfNeeded ( animated: animated)
250
250
}
251
251
252
+ // MARK: - Container view controller forwarding
253
+
254
+ open override var childViewControllerForStatusBarStyle : UIViewController ? {
255
+ return childViewControllers. last
256
+ }
257
+
258
+ open override var childViewControllerForStatusBarHidden : UIViewController ? {
259
+ return childViewControllers. last
260
+ }
261
+
262
+ @available ( iOS 11 , * )
263
+ open override func childViewControllerForScreenEdgesDeferringSystemGestures( ) -> UIViewController ? {
264
+ return childViewControllers. last
265
+ }
266
+
267
+ @available ( iOS 11 , * )
268
+ open override func childViewControllerForHomeIndicatorAutoHidden( ) -> UIViewController ? {
269
+ return childViewControllers. last
270
+ }
271
+
252
272
// MARK: - State transitioning
253
273
254
274
/// Indicates whether the view controller currently is transitioning between states.
@@ -530,6 +550,15 @@ fileprivate extension StateViewController {
530
550
addContentViewController ( viewController, animated: animated)
531
551
}
532
552
553
+ if adding. isEmpty == false || removing. isEmpty == false {
554
+ setNeedsStatusBarAppearanceUpdate ( )
555
+
556
+ if #available( iOS 11 , * ) {
557
+ setNeedsUpdateOfHomeIndicatorAutoHidden ( )
558
+ setNeedsUpdateOfScreenEdgesDeferringSystemGestures ( )
559
+ }
560
+ }
561
+
533
562
// Update the hierarchy of the view controllers that will represent the state being transitioned to.
534
563
updateHierarchy ( of: next)
535
564
return true
0 commit comments