diff --git a/LNPopupController/LNPopupController/Private/UIViewController+LNPopupSupportPrivate.mm b/LNPopupController/LNPopupController/Private/UIViewController+LNPopupSupportPrivate.mm index 8d979f6..dedc2e1 100644 --- a/LNPopupController/LNPopupController/Private/UIViewController+LNPopupSupportPrivate.mm +++ b/LNPopupController/LNPopupController/Private/UIViewController+LNPopupSupportPrivate.mm @@ -462,6 +462,17 @@ - (void)_ln_willTransitionToTraitCollection:(UITraitCollection *)newCollection w } [self _ln_willTransitionToTraitCollection:newCollection withTransitionCoordinator:coordinator]; + + if(@available(iOS 18.0, *)) + { + if([self isKindOfClass:UITabBarController.class]) + { + [coordinator animateAlongsideTransition:nil completion:^(id _Nonnull context) { + static SEL sel = NSSelectorFromString(LNPopupHiddenString("_forceUpdateScrollViewIfNecessary")); + [self performSelector:sel]; + }]; + } + } } - (UIViewController*)_findAncestorParentPopupContainerController diff --git a/LNPopupControllerExample/LNPopupControllerExample.xcodeproj/xcshareddata/xcschemes/LNPopupControllerExampleNoPopup.xcscheme b/LNPopupControllerExample/LNPopupControllerExample.xcodeproj/xcshareddata/xcschemes/LNPopupControllerExampleNoPopup.xcscheme index 14a9386..3a3b565 100644 --- a/LNPopupControllerExample/LNPopupControllerExample.xcodeproj/xcshareddata/xcschemes/LNPopupControllerExampleNoPopup.xcscheme +++ b/LNPopupControllerExample/LNPopupControllerExample.xcodeproj/xcshareddata/xcschemes/LNPopupControllerExampleNoPopup.xcscheme @@ -1,7 +1,7 @@ + version = "2.0"> @@ -37,9 +37,11 @@ launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" - debugDocumentVersioning = "YES" + debugDocumentVersioning = "NO" + debugXPCServices = "NO" debugServiceExtension = "internal" - allowLocationSimulation = "YES"> + allowLocationSimulation = "YES" + queueDebuggingEnabled = "No"> : UIPageViewController, UIPageViewControllerDataSource { override func viewDidLoad() { super.viewDidLoad() - +#if LNPOPUP let useCompact = UserDefaults.settings.integer(forKey: .barStyle) == LNPopupBar.Style.compact.rawValue let gridBarButtonItem = UIBarButtonItem() @@ -24,6 +24,7 @@ class _ScrollingColorsPageViewController: UIPag popupItem.barButtonItems = [gridBarButtonItem] LNApplyTitleWithSettings(to: self) +#endif dataSource = self diff --git a/LNPopupControllerExample/LNPopupControllerExample/TestingScene/ScrollingMapViewController.swift b/LNPopupControllerExample/LNPopupControllerExample/TestingScene/ScrollingMapViewController.swift index 2122fd8..3138c8b 100644 --- a/LNPopupControllerExample/LNPopupControllerExample/TestingScene/ScrollingMapViewController.swift +++ b/LNPopupControllerExample/LNPopupControllerExample/TestingScene/ScrollingMapViewController.swift @@ -12,6 +12,7 @@ class ScrollingMapViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() +#if LNPOPUP let useCompact = UserDefaults.settings.integer(forKey: .barStyle) == LNPopupBar.Style.compact.rawValue let gridBarButtonItem = UIBarButtonItem() @@ -19,5 +20,6 @@ class ScrollingMapViewController: UIViewController { popupItem.barButtonItems = [gridBarButtonItem] LNApplyTitleWithSettings(to: self) +#endif } }