Skip to content

Commit dd19c86

Browse files
authored
Merge pull request #311 from SCENEE/return-childvc-to-consult
Return the child view controller to consult
2 parents 847b5c0 + 801fed9 commit dd19c86

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

Framework/Sources/FloatingPanelController.swift

+35
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,41 @@ open class FloatingPanelController: UIViewController {
285285
safeAreaInsetsObservation = nil
286286
}
287287

288+
// MARK:- Child view controller to consult
289+
#if swift(>=4.2)
290+
open override var childForStatusBarStyle: UIViewController? {
291+
return contentViewController
292+
}
293+
294+
open override var childForStatusBarHidden: UIViewController? {
295+
return contentViewController
296+
}
297+
298+
open override var childForScreenEdgesDeferringSystemGestures: UIViewController? {
299+
return contentViewController
300+
}
301+
302+
open override var childForHomeIndicatorAutoHidden: UIViewController? {
303+
return contentViewController
304+
}
305+
#else
306+
open override var childViewControllerForStatusBarStyle: UIViewController? {
307+
return contentViewController
308+
}
309+
310+
open override var childViewControllerForStatusBarHidden: UIViewController? {
311+
return contentViewController
312+
}
313+
314+
open override func childViewControllerForScreenEdgesDeferringSystemGestures() -> UIViewController? {
315+
return contentViewController
316+
}
317+
318+
open override func childViewControllerForHomeIndicatorAutoHidden() -> UIViewController? {
319+
return contentViewController
320+
}
321+
#endif
322+
288323
// MARK:- Internals
289324
func prepare(for newCollection: UITraitCollection) {
290325
guard newCollection.shouldUpdateLayout(from: traitCollection) else { return }

0 commit comments

Comments
 (0)