File tree Expand file tree Collapse file tree
Application/DevLogPresentation/Sources/Common/Component Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -310,20 +310,17 @@ private struct ToastCardView<Label: View>: View {
310310@MainActor
311311private extension UIViewController {
312312 var visibleTabBarHeight : CGFloat {
313- if let tabBarController = self as? UITabBarController {
314- return tabBarController. tabBar. isHidden ? . zero : tabBarController. tabBar. frame. height
315- }
313+ var topViewController = self
316314
317- if let tabBarController {
318- return tabBarController . tabBar . isHidden ? . zero : tabBarController . tabBar . frame . height
315+ while let presentedViewController = topViewController . presentedViewController {
316+ topViewController = presentedViewController
319317 }
320318
321- if let presentedViewController,
322- 0 < presentedViewController. visibleTabBarHeight {
323- return presentedViewController. visibleTabBarHeight
319+ if let tabBarController = ( topViewController as? UITabBarController ) ?? topViewController. tabBarController {
320+ return tabBarController. tabBar. isHidden ? . zero : tabBarController. tabBar. frame. height
324321 }
325322
326- for child in children {
323+ for child in topViewController . children {
327324 let childHeight = child. visibleTabBarHeight
328325 if 0 < childHeight {
329326 return childHeight
You can’t perform that action at this time.
0 commit comments