swiftuibuttonios26liquid-glass

iOS 26 UIButton liquid glass tint flickers during interactive dismiss of zoom transition


I'm experiencing an issue with a UIButton using UIButton.Configuration.prominentGlass() on iOS 26. When I present a modal using iOS 18's .zoom transition and then interactively dismiss it (swipe down), the button's tint color briefly flickers/changes before returning to normal.

If you dismiss it using the dismiss button, everything works perfectly.

        var configuration = UIButton.Configuration.prominentGlass()
        configuration.image = UIImage(named: AssetIdentifier.plus.rawValue)
        configuration.cornerStyle = .capsule
        self.configuration = configuration

And this is how I'm presenting modally the view controller.

        if #available(iOS 18.0, *) {
            if let sheet = navigationController.sheetPresentationController {
                let customDetent = UISheetPresentationController.Detent.custom { context in
                    return context.maximumDetentValue - 84
                }
                sheet.detents = [customDetent, .large()]
                sheet.selectedDetentIdentifier = customDetent.identifier
                sheet.preferredCornerRadius = 20
                sheet.prefersScrollingExpandsWhenScrolledToEdge = true
                sheet.prefersGrabberVisible = true
            }
            
            // Zoom transition
            if let zoomSourceView = sourceView {
                navigationController.preferredTransition = .zoom { _ in
                    zoomSourceView
                }
            }
        }
        
        presenter.present(navigationController, animated: true, completion: nil)
    }

When the modal is presented with the .zoom transition from the FloatingActionButton, and the user interactively dismisses it by swiping down, the FAB's baseForegroundColor (white) briefly flickers/changes during the dismiss animation before returning to the correct color.

If I'm using a filled button this doesn't happen, only if I'm using a liquid glass button.
I think it's a problem from iOS 26.
I tested using iOS 26.2.

Do you have any fixes for this?

Demo of the bug


Solution

  • During an interactive dismiss, UIKit temporarily switches the presenting view to tintAdjustmentMode = .dimmed, which causes Liquid Glass buttons to briefly change color.

    Forcing:

    button.tintAdjustmentMode = .normal // (or sourceView)
    

    (or applying it to the container) prevents UIKit from dimming the tint, so the flicker disappears — but this is a workaround for a system behavior, not an official fix.