v4.2.6
- LNPopupController now uses the system margins for
UINavigationController
containers - Fixed legacy iOS layout issues introduced previously
- Fixed Xcode 16 compilation
[!NOTE] Xcode 16 support is going away soon! Xcode 26 will be required to compile and run LNPopupController, with iOS 13.0 still being the lowest supported iOS version. If you are not yet ready to support the new glass design in iOS 26 or macOS 26, use the
UIDesignRequiresCompatibility
Info.plist key with a value oftrue
.
v4.2.5
- Layout improvements for
UINavitationController
containers on iOS 26 -
LNPopupContentView
will no longer attempt to observe the popup content view controller’soverrideUserInterfaceStyle
property- Instead, set
LNPopupContentView
'straitOverrides.userUnterfaceStyle
oroverrideUserInterfaceStyle
directly
- Instead, set
- Fixed incorrect red tinting of galss buttons committed by mistake
v4.2.4
- Layout improvements for
UINavitationController
containers on iOS 26 -
LNPopupContentView
will no longer attempt to observe the popup content view controller’soverrideUserInterfaceStyle
property- Instead, set
LNPopupContentView
'straitOverrides.userUnterfaceStyle
oroverrideUserInterfaceStyle
directly
- Instead, set
v4.2.3
- Added “shiny” glass popup close button
- More layout improvements
v4.2.2
- Added
LNPopupCloseButton.Style.glass
,.clearGlass
,.prominentGlass
and.prominentClearGlass
popup close button styles - Added
LNPopupCloseButton.Positioning
to control the positioning of the popup close button within the popup content view
v4.2.1
- Improve scrolling popup content handling
- Title layout improvements
- Default title fonts were slightly adjusted to be in line with iOS 26
- Added
LNPopupBarAppearance.floatingBarShineEnabled
v4.2.0
Significantly expanded and improved custom popup container controller support.
Any UIViewController
can be a popup container view controller. The popup bar can be attached to either the bottom of the screen or above a bottom docking view. If you have a custom container controller, such as a custom tab bar controller, you can override the bottomDockingViewForPopupBar
property to return your designated bottom docking view, and defaultFrameForBottomDockingView
to return the expected frame of the docking view. When presented, the popup bar will appear above the designated bottom docking view. If the container controller needs to reposition the bottom docking view, trigger a layout pass so the popup bar can take the new frame into account.
If you return nil
from bottomDockingViewForPopupBar
, the popup bar will be positioned at the bottom of the screen, or above the appropriate system bottom bar, such as a tab bar or a toolbar.
If your custom container controller supports hiding the designated bottom docking view, implement isBottomDockingViewForPopupBarHidden
and return the correct value. To trigger a popup bar update, trigger a layout pass for your container controller's view. If the bottom docking view is hidden, the popup bar will be positioned at the bottom of the screen.
You can control the margin between the popup bar and the bottom docking view by implementing bottomDockingViewMarginForPopupBar
.
If your bottom docking view is dependent on the safe area of your custom container controller, you might not want to have that be modified by the presentation of the popup bar. In such a case, implement the requiresIndirectSafeAreaManagement
property to return true
. The system will then modify the child controller's safe areas instead of modifying the container controller's safe area.
class MyCustomTabBarController: UITabBarController {
override var bottomDockingViewForPopupBar: UIView? {
return myCustomTabBar
}
override var defaultFrameForBottomDockingView: CGRect {
myCustomTabBar.frame
}
override var isBottomDockingViewForPopupBarHidden: Bool {
!isMyCustomTabBarVisible
}
override var bottomDockingViewMarginForPopupBar: CGFloat {
8.0
}
func toggleMyCustomTabBarVisible() {
UIView.animate(withDuration: 0.4,
delay: 0.0,
usingSpringWithDamping: 1.0,
initialSpringVelocity: 0.0) {
self.isMyCustomTabBarVisible.toggle()
// Animate your bar position here according to isMyCustomTabBarVisible.
self.updateMyCustomTabBarConstraints()
// Trigger a layout pass so that the popup bar animates to the correct position
self.view.layoutIfNeeded()
}
}
}
v4.1.1
- Added
LNPopupBar.inlineAppearance
andLNPopupItem.inlineAppearance
- If provided, the popup will switch appearances as it transitions from inline to regular
- By default, these properties are
nil
and the standard appearance is used
- iOS 26.1 improvements (ongoing)
-
setItems(_:animated:)
will now better animate popup bar item change - Numerous layout fixes and improvements
v4.1.0
Introducing popup bar minimization support!
To enable, set the minimization mode of the tab bar controller:
self.tabBarController?.tabBarMinimizeBehavior = .onScrollDown
To listen to bar environment changes in your popup content controller and update the popup item accordingly, register for the LNPopupBar.EnvironmentTrait
trait changes:
registerForTraitChanges([LNPopupBar.EnvironmentTrait.self]) { (self: Self, previousTraitCollection) in
popupItem.barButtonItems = self.traitCollection.popUpBarEnvironment == .inline ? /* inline bar */ : /* regular bar */
}
You can also handle changes in traitCollectionDidChange(_:)
.
Popup bar minimization is enabled by default, and is supported for system and custom popup bars, with the exception of custom bars with LNPopupBar.customBarWantsFullBarWidth = true
. To disable popup bar minimization, set LNPopupBar.supportsMinimization
to false
.