Construct and manage graphical, event-driven user interfaces for iOS or tvOS apps using UIKit.

Posts under UIKit tag

200 Posts

Post

Replies

Boosts

Views

Activity

UIKit flip animation bugged in 26.1
Hello. I have an 12 year old app that still has some objective-c code in it. I have a place where i have a flip animation between 2 view controllers that looks like this: [UIView transitionFromView:origView toView:newViewController.view duration:0.5 options:UIViewAnimationOptionTransitionFlipFromRight completion:nil]; It has looked like this since 2012 at least. In our production release, it works prior to 26.1, but in 26.1 and 26.2, the flip is off-center and looks weird. it's like both edges flip the same way. It's a little bit hard to explain. If seen at least 2 other app store apps that i have installed behave this way too, from 26.1 and onwards. Anyone else seen this? Is there anything that can be done about it? Thankful for thoughts.
2
1
81
10h
UIToolbar + liquid glass = autolayout warnings?
I have an app where I create UIToolbars and add them to UIViews programatically. I've never used autolayout for anything, I've never assigned any constraints to anything, etc. This worked fine pre-iOS 26. Now I'm trying to build for iOS 26 (liquid glass) and my toolbars are spamming my debug pane with hundreds of lines of autolayout warnings. Here are some key phrases from the warnings: Unable to simultaneously satisfy constraints. Will attempt to recover by breaking constraint Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) Does anybody know what happened and how I can get it to stop? The way things are, I can't use the debug pane for anything because of this spam.
1
0
86
17h
Unwanted animations appear on UIButton (iOS 26)
After the iOS 26 update, unwanted animations appear on UIButton. I'm using the attributedTitle property of UIButton.Configuration to change the button's text, and an animation appears after iOS 26. (It's unclear whether it's after iOS 26.0 or iOS 26.1, but it likely started with 26.1.) The peculiar thing is that the animation only starts appearing on buttons that have been pressed once. I tried using UIView.performWithoutAnimation and CATransaction's begin(), setDisableActions(true), commit(), but it didn't work. How should I solve this? Below is the code for changing the button's text. func updateTitle() { let keys = type.keys if keys.count == 1 { guard let key = keys.first else { return } if key.count == 1 { if Character(key).isLowercase { self.configuration?.attributedTitle = AttributedString(key, attributes: AttributeContainer([.font: UIFont.systemFont(ofSize: 24, weight: .regular), .foregroundColor: UIColor.label])) } else if Character(key).isUppercase { self.configuration?.attributedTitle = AttributedString(key, attributes: AttributeContainer([.font: UIFont.systemFont(ofSize: 22, weight: .regular), .foregroundColor: UIColor.label])) } else { self.configuration?.attributedTitle = AttributedString(key, attributes: AttributeContainer([.font: UIFont.systemFont(ofSize: 22, weight: .regular), .foregroundColor: UIColor.label])) } } else { self.configuration?.attributedTitle = AttributedString(key, attributes: AttributeContainer([.font: UIFont.systemFont(ofSize: 18, weight: .regular), .foregroundColor: UIColor.label])) } } else { let joined = keys.joined(separator: "") self.configuration?.attributedTitle = AttributedString(joined, attributes: AttributeContainer([.font: UIFont.systemFont(ofSize: 22, weight: .regular), .foregroundColor: UIColor.label])) } }
0
0
36
21h
UIKit Crash During Navigation Transition After Changing UIView.appearance().semanticContentAttribute (Arabic RTL) — iOS 17.2.1
Device: iPhone 11 iOS Version: 17.2.1 Frameworks: UIKit, Auto Layout App Behavior: App supports Arabic (RTL). User can switch language in-app. When language is switched, the app sets UIView.appearance().semanticContentAttribute and fully rebuilds the window’s rootViewController. Problem Summary I update the global semantic direction only when the user explicitly switches language inside the app — e.g.: // Only run when user switches language inside the app UIView.appearance().semanticContentAttribute = .forceRightToLeft // or .forceLeftToRight // then rebuild the window's rootViewController I do not change UIView.appearance().semanticContentAttribute during navigation transitions. Despite that, after switching the language (and rebuilding the root), the app sometimes crashes during a subsequent UINavigationController push/pop animation. The crash appears to be caused by UIKit’s Auto Layout engine removing or updating directional constraints while a navigation transition is running. Crash Log (most relevant portion) Crashed: com.apple.main-thread 0 CoreAutoLayout 0x1372c -[NSISEngine positiveErrorVarForBrokenConstraintWithMarker:errorVar:] + 212 1 CoreAutoLayout 0x121d4 -[NSISEngine removeConstraintWithMarker:] + 1028 2 CoreAutoLayout 0x11d78 -[NSLayoutConstraint _removeFromEngine:] + 148 3 UIKitCore 0x124ba9c __58-[UIView _updateDirectionalConstraintsIfNeededWasFlipped:]_block_invoke_2 + 56 4 UIKitCore 0x484d4 ___UIViewEnumerateLayoutConstraintsAndAdjustForSelectedLayoutVariables_block_invoke + 296 5 UIKitCore 0x4801c -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 112 6 UIKitCore 0x60830 -[UIView _updateDirectionalConstraintsIfNeededWasFlipped:] + 356 7 UIKitCore 0x60494 -[UIView setSemanticContentAttribute:] + 148 8 CoreFoundation 0x31794 __invoking___ + 148 9 CoreFoundation 0xe6360 -[NSInvocation invokeUsingIMP:] + 332 10 UIKitCore 0x1d93ec __workaround10030904InvokeWithTarget_block_invoke + 68 11 UIKitCore 0x250ec +[UIView _performSystemAppearanceModifications:] + 72 12 UIKitCore 0x3f008 applyInvocationsToTarget + 1004 13 UIKitCore 0x3dcd4 +[_UIAppearance _applyInvocationsTo:window:matchingSelector:onlySystemInvocations:] + 1180 14 UIKitCore 0x3d744 __88-[UIView(Internal) _performUpdatesForPossibleChangesOfIdiom:orScreen:traverseHierarchy:]_block_invoke + 68 15 UIKitCore 0x3d6c4 -[UIView _performUpdatesForPossibleChangesOfIdiom:orScreen:traverseHierarchy:] + 216 16 UIKitCore 0x3d5a0 -[UIView _didChangeFromIdiomOnScreen:traverseHierarchy:] + 112 17 UIKitCore 0x11644 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1220 18 UIKitCore 0x1142c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 684 19 UIKitCore 0x1142c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 684 20 UIKitCore 0x1142c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 684 21 UIKitCore 0x10eb4 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 124 22 CoreAutoLayout 0xa514 -[NSISEngine withBehaviors:performModifications:] + 84 23 UIKitCore 0x10ddc -[UIView _postMovedFromSuperview:] + 504 24 UIKitCore 0xfa24 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 2200 25 UIKitCore 0x7a63b8 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke_2 + 1252 26 UIKitCore 0x41a70 +[UIView(Animation) performWithoutAnimation:] + 76 27 UIKitCore 0x7a5e84 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 240 28 UIKitCore 0x12749c +[UIView _performBlockDelayingTriggeringResponderEvents:forScene:] + 176 29 UIKitCore 0x7a5990 -[_UINavigationParallaxTransition animateTransition:] + 952 30 UIKitCore 0x291098 ___UIViewControllerTransitioningRunCustomTransition_block_invoke_3 + 52 31 UIKitCore 0x29100c +[UIKeyboardSceneDelegate _pinInputViewsForKeyboardSceneDelegate:onBehalfOfResponder:duringBlock:] + 96 32 UIKitCore 0x290f70 ___UIViewControllerTransitioningRunCustomTransition_block_invoke_2 + 196 33 UIKitCore 0x1d8c8c +[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:] + 180 34 UIKitCore 0x1d851c _UIViewControllerTransitioningRunCustomTransition + 484 35 UIKitCore 0x6f5a84 -[UINavigationController _startCustomTransition:] + 3292 36 UIKitCore 0x1182a8 -[UINavigationController _startDeferredTransitionIfNeeded:] + 496 37 UIKitCore 0x1179a0 -[UINavigationController __viewWillLayoutSubviews] + 96 38 UIKitCore 0x117904 -[UILayoutContainerView layoutSubviews] + 172 39 UIKitCore 0x3297c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1528 40 QuartzCore 0x66aa8 CA::Layer::layout_if_needed(CA::Transaction*) + 500 41 QuartzCore 0x66630 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144 42 QuartzCore 0x6cb60 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 464 43 QuartzCore 0x65e3c CA::Transaction::commit() + 648 44 QuartzCore 0x65ae4 CA::Transaction::flush_as_runloop_observer(bool) + 88 45 CoreFoundation 0x3583c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 46 CoreFoundation 0x34244 __CFRunLoopDoObservers + 548 47 CoreFoundation 0x33960 __CFRunLoopRun + 1028 48 CoreFoundation 0x33478 CFRunLoopRunSpecific + 608 49 GraphicsServices 0x34f8 GSEventRunModal + 164 50 UIKitCore 0x22c62c -[UIApplication _run] + 888 51 UIKitCore 0x22bc68 UIApplicationMain + 340 52 MyApp 0x46a040 main + 44 (AppDelegate.swift:44) 53 ??? 0x1c8d52dcc (缺少) Questions / Requests Recommended patterns for in-app language switching (LTR ⇄ RTL) to avoid direction/constraint races during animations? For example: Should semantic direction be applied to the window/root view controller only? Should we avoid rebuilding root during an active transition? Any suggested synchronization (e.g., wait for transitions to finish) or APIs to call after rebuilding?
0
0
15
1d
Tab Bar missing for macCatalyst app on macOS 26.2 Beta 3
This is a problem from Beta 1, but since there is no fix yet in Beta 3, I'd like to raise it. The app is built with macCatalyst, and we have pretty simple tab bar controller setup: viewController = UITabBarController() viewController.tabBar.tintColor = .buttonForegroundColor importWorkflow = ModelImportWorkflow( userInterfaceIdiom: userInterfaceIdiom, workspace: workspace) mergeWorkflow = ModelMergeWorkflow(userInterfaceIdiom: userInterfaceIdiom, workspace: workspace) listWorkflow = ModelListWorkflow(workspace: workspace, userInterfaceIdiom: userInterfaceIdiom) viewController.viewControllers = [ listWorkflow.viewControllable, importWorkflow.viewControllable, mergeWorkflow.viewControllable, ] viewController.modalPresentationStyle = .formSheet We don't do any customizations on the tab bar and in Beta 3 (26.2), there is no way to found the tab bar (attached a user reported image). Please advise what's the course of action. Thanks.
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
39
1d
Mac Catalyst Getting Unacceptable Window Resizing Performance on macOS Tahoe With Liquid Glass Design
When I run my Mac Catalyst app I'm getting unacceptable performance when resizing the window. Window resizing is very unresponsive/laggy. Configuration: The root view controller is a UISplitViewController (three pane split using UISplitViewControllerStyleTripleColumn). Sidebar is configured. It's using a UICollectionView sidebar style (so it looks like NSOutlineView in AppKit). On initial launch there is no selection and the second and third view controllers in the split have empty placeholder view controllers. At this point window resizing is fine. Now I make a selection in the sidebar. This populates the supplementary view controller with a view controller that uses a UITableView. Now resizing the window performance is awful. Basically this is unusable. When resizing the window a bunch what looks to be Core Animation related logs flood the console during window resize: cannot add handler to 3 from 1 - dropping Library: QuartzCore | Subsystem: com.apple.coreanimation Now if I go to my app's Info.plist and add: UIDesignRequiresCompatibility entry with a value of TRUE and follow the same steps described above window resizing works as expected and I do not experience performance issues. Also with UIDesignRequiresCompatibility there is no "cannot add handlers" error logs flooding the console on window resize.
1
0
29
1d
Mac Catalyst Crash on App Launch on macOS 26.1: Assertion failure in -[NSToolbarItemGroupView _layoutWrapperViewsWithAttributes:], NSToolbarItemGroupView.m:599
Returning to a Mac Catalyst app that I put to the side for awhile..when running it on Xcode 26.1 it crashes at launch with: Assertion failure in -[NSToolbarItemGroupView _layoutWrapperViewsWithAttributes:], NSToolbarItemGroupView.m:599 No attributes were found for item Call stack has a bunch of Autolayout code in AppKit like: [NSWindow(NSConstraintBasedLayoutInternal) _layoutViewTree] + 120 50 AppKit 0x00000001911e8a10 -[NSWindow(NSConstraintBasedLayoutInternal) layoutIfNeeded] + 240 51 UIKitMacHelper 0x00000001a98f293c -[UINSWindow layoutIfNeeded] + 56 A few unnamed symbols mixed in maybe that's that Swiftness beneath the surface. App is just murdered on launch. I assume this is related to using NSToolbarItemGroup when building an NSToolbar... I do see this log out: NSToolbarItemGroup does not support selectionMode. Create the group with one of the class constructors to support selection. Which is an interesting log so I commented out all calls to setSelectionMode: but still the same crash. I do set the groups subitems property directly (I do not use the class constructors as the logging statement above indicates). I have no idea if using the class constructors will workaround this issue or not but I'm not particularly excited about that idea because I have items in the same toolbar group with different actions.
4
0
126
2d
UICollectionViewCell Selected State Won't Highlight the Cell
Hi, I'm using a UICollectionViewCell in my project and I can't wrap my head around why cell's UI state isn't changing when selected. This is my code: override func updateConfiguration(using state: UICellConfigurationState) { super.updateConfiguration(using: state) var background = UIBackgroundConfiguration.listGroupedCell().updated(for: state) background.cornerRadius = 25 // Update background based on selection state if state.isSelected { background.backgroundColor = .systemBlue.withAlphaComponent(0.3) background.strokeColor = UIColor.systemBlue background.strokeWidth = 1.5 } else { background.backgroundColor = isHoveredOver ? .hoverHighlightBackground : .background background.strokeColor = UIColor.borderColor background.strokeWidth = 1 } backgroundConfiguration = background } The if block does get executed but it's not working for some reason. On the other hand, the else block works just fine, my cell's background is being highlighted when hovered over, the stroke is showing etc. What am I missing here? Thank you.
Topic: UI Frameworks SubTopic: UIKit Tags:
3
1
93
2d
iOS 26: cells overlap in UICollectionView orthogonal scrolling section after zoom transition
I have a UICollectionView using a UICollectionViewCompositionalLayout with an orthogonally scrolling section. When selecting a cell, I present a modal view controller with a zoom transition. If I scroll quickly in that section after dismissing the presented view controller, the cells briefly overlap. See the attached screenshot. This issue occurs only on iOS 26 and does not occur on iOS 18. Has anyone found a way to mitigate this? Sample project: https://github.com/antiraum/iOS26_UICollectionViewZoomTransitionIssue Feedback FB21022192
1
0
58
2d
UIVisualEffectView with UIGlassEffect with only 2 rounded corners
Trying to make a sheet-like view that attaches at the bottom to another view so I'd like to have only the top two corners rounded. This works for a blurred effect: let glassView = UIVisualEffectView(effect: UIBlurEffect(style: .systemMaterial)) glassView.layer.cornerRadius = 20 glassView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] glassView.layer.masksToBounds = true but if I try to use the iOS 26 UIGlassEffect, all 4 corners become rounded: let glassView = UIVisualEffectView(effect: UIGlassEffect()) glassView.layer.cornerRadius = 20 glassView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] glassView.layer.masksToBounds = true
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
69
3d
iOS 26.1 adds dark tint under transparent tab bar and ui elements (worked correctly in iOS 26)
After updating from iOS 26 to iOS 26.1, all my transparent system elements (i.e. UITabBar, UIBarButtonItem) started rendering with a dark background tint. In iOS 26 the same configuration looked fully transparent / glassy. The strange part is that the tint only appears in normal UIViewControllers. In UITableViewController the tab bar still looks correct and transparent, even on iOS 26.1. I am using the same appearance code as before: func setupTabBarAppearance() { guard let tabBar = tabBarController?.tabBar else { return } if #available(iOS 26.0, *) { let appearance = UITabBarAppearance() appearance.configureWithTransparentBackground() appearance.backgroundColor = .clear appearance.backgroundEffect = nil appearance.shadowColor = .clear tabBar.standardAppearance = appearance tabBar.scrollEdgeAppearance = appearance tabBar.isTranslucent = true tabBar.backgroundColor = .clear tabBar.barTintColor = .clear } else { tabBar.isTranslucent = true tabBar.backgroundImage = UIImage() tabBar.shadowImage = UIImage() tabBar.backgroundColor = .clear } } I tried removing backgroundEffect, forcing .clear colors, using configureWithDefaultBackground, changing edgesForExtendedLayout, extendedLayoutIncludesOpaqueBars, etc. I noticed that if I change Liquid Glass in iOS 26 settings from Clear to Tinted, then I get a black tint everywhere and the interface becomes consistent, but not the way I want. Nothing removes the new dark tint in iOS 26.1. Is this an intentional change in iOS 26.1, a bug, or is there a new way to make the tab bar fully transparent again?
1
0
57
3d
UITableView section flickering with Liquid Glass design
Description of the current implementation: A section, UIView, has been added to UITableView. This section is a UICollectionView that displays an array of images. Each UICollectionViewCell is an image displayed via a UIImageView. Issue: When UITableView is scrolled vertically, the section with the image collection flickers. Attempts made to solve the problem: if #available(iOS 26.0, *) { tableView.bottomEdgeEffect.isHidden = true tableView.topEdgeEffect.isHidden = true tableView.leftEdgeEffect.isHidden = true tableView.rightEdgeEffect.isHidden = true } else { // Fallback on earlier versions } This helped with a similar issue. I tried it on UITableView and UICollectionView, but it didn't work.
1
0
68
3d
Incorrect system color on popover view, and does not update while switching dark mode on iOS 26 beta 3
All system colors are displayed incorrectly on the popover view. Those are the same views present as a popover in light and dark mode. And those are the same views present as modal. And there is also a problem that when the popover is presented, switching to dark/light mode will not change the appearance. That affected all system apps. The following screenshot is already in dark mode. All those problem are occured on iOS 26 beta 3.
5
0
443
4d
32 byte NSNumber memory leak - how to fix?
I use the following bit of code to snapshot a View as a UIImage, but it's causing a memory leak: extension View { @ViewBuilder func snapshot(trigger: Bool, onComplete: @escaping (UIImage) -> ()) -> some View { self.modifier(SnapshotModifier(trigger: trigger, onComplete: onComplete)) } } fileprivate struct SnapshotModifier: ViewModifier { var trigger: Bool var onComplete: (UIImage) -> () @State private var view: UIView = .init(frame: .zero) func body(content: Content) -> some View { content .background(ViewExtractor(view: view)) .compositingGroup() .onChange(of: trigger) { generateSnapshot() } } private func generateSnapshot() { if let superView = view.superview?.superview { let render = UIGraphicsImageRenderer(size: superView.bounds.size) let image = render.image { _ in superView.drawHierarchy(in: superView.bounds, afterScreenUpdates: true) } onComplete(image) } } } fileprivate struct ViewExtractor: UIViewRepresentable { var view: UIView func makeUIView(context: Context) -> UIView { view.backgroundColor = .clear return view } func updateUIView(_ uiView: UIView, context: Context) { // No process } } Taking the snapshot is triggered like this: struct ContentView: View { @State private var triggerSnapshot: Bool = false var body: some View { Button("Press to snapshot") { triggerSnapshot = true } TheViewIWantToSnapshot() .snapshot(trigger: triggerSnapshot) { image in // Save the image; you don't have to do anything here to get the leak. } } } I'm not the best at Instruments, and this is what the Leaks template produces. There are no method names, just memory addresses: Is this leak in an internal iOS library, is there something wrong with Instruments, or am I missing something obvious in my code? Thanks.
Topic: UI Frameworks SubTopic: UIKit Tags:
3
0
83
4d
VoiceOver accessibility issue in UIKit for line granularity
Context: We are using UIKit to provide accessibility in our app for our iOS users. Our app majorly contains documents/books that user can read. Issue: The issue is VoiceOver is skipping the lines given to it when there are some leading spaces in it. We have observed this issue in different languages. This is only happening for line granularity, other granularities seems to be working as expected. Implementation: We are using below API's to provide line content to voice over. UIAccessibilityReadingContent - accessibilityPageContent - accessibilityFrameForLineNumber - accessibilityContentForLineNumber We are creating UIAccessibilityElement objects to pass to VoiceOver and each UIAccessibilityElement implements UIAccessibilityReadingContent to provide readable content. We also use below APIs to cross element boundaries for all granular navigations. accessibilityNextTextNavigationElement accessibilityPreviousTextNavigationElement We want to know whether skipping the line when provided with leading spaces is expected or a bug in UIKit.
1
0
240
4d
unselectedItemTintColor of tabBarItem in iOS 26
Hi, I am running iOS Simulator on iOS 26 and I am trying to change unselectedItemTintColor of UITabBarItem in my TabBarViewController but it did not work when I tried following ways: Setting an iconColor through UITabBarAppearance() class Setting unselected item tint color like tabBar.unselectedItemTintColor = .black As an example attached file, I would like to set Settings tab's item color (icon + title) with different one when it is unselected.
Topic: UI Frameworks SubTopic: UIKit Tags:
2
3
165
4d
NotificationCenter Crash On iOS 18+ Swift6.2
After switching our iOS app project from Swift 5 to Swift 6 and publishing an update, we started seeing a large number of crashes in Firebase Crashlytics. The crashes are triggered by NotificationCenter methods (post, addObserver, removeObserver) and show the following error: BUG IN CLIENT OF LIBDISPATCH: Assertion failed: Block was expected to execute on queue [com.apple.main-thread (0x1f9dc1580)] All scopes to related calls are already explicitly marked with @MainActor. This issue never occurred with Swift 5, but appeared immediately after moving to Swift 6. Has anyone else encountered this problem? Is there a known solution or workaround? Thanks in advance!
1
1
940
1w
Modal presentation of SwiftUI view with TextField leads to frozen UI, missing keyboard and memory leak
Hello, I’m trying to present my custom SwiftUI dialog with text field in UIKit with modalPresentationStyle = .overFullScreen, but it leads to the UI being completely frozen once I select the TextField and memory constantly leaking. The minimal reproducible code is: class ModalBugViewController: UIViewController { var hostingController: UIHostingController<Content>! struct Content: View { @State private var text = "" var body: some View { ZStack { Color.black.opacity(0.5).ignoresSafeArea() VStack { TextField("Test", text: $text) .textFieldStyle(.roundedBorder) .padding() } } } } override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .clear hostingController = UIHostingController(rootView: Content()) addChild(hostingController) view.addSubview(hostingController.view) hostingController.view.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ hostingController.view.topAnchor.constraint(equalTo: view.topAnchor), hostingController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor), hostingController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor), hostingController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor) ]) hostingController.didMove(toParent: self) } } And then in UIKit source view: let viewController = ModalBugViewController() viewController.modalPresentationStyle = .overFullScreen present(viewController, animated: true) The bug is reproducible on iOS 18 - 26.1, even on the simulator, although on iOS 26 it's in landscape mode only. Is there some workaround for this issue that doesn't involve rewriting the whole dialog in UIKit?
1
0
75
1w
Bar button item showing wrong overlay after pop transition on iOS 26.1
I am experiencing a frustrating bug on iOS 26.1 that makes my app look as if it lacks attention to detail. Basically, when having a NavigationStack, where the root view has a top-right confirmation bar button item, and a pushed detail view does not have any button in the navigation bar trailing position, upon poping back to the root view, the confirmation bar button item shows a white overlay for about 1-2 seconds before finally disappearing and showing the correct appearance. Here is the incorrect appearance right after the pop transition: Eventually after about 1,5 seconds it gets turned back to what it should look like: Here is the full code that you can use to reliably reproduce this issue on iOS 26.1: @State private var path: [Int] = [] var body: some View { NavigationStack(path: $path) { VStack { Text("First View") .font(.title) } .navigationDestination(for: Int.self, destination: { param in Text("Detail View") .font(.title) }) .navigationTitle("First") .navigationBarTitleDisplayMode(.inline) .toolbar { ToolbarItemGroup(placement: .confirmationAction) { Button("Next", role: .confirm, action: { self.path.append(1) }) } } } } } I submitted a Feedback for it: FB21010613 . Is there anything at all I can do on my end to work around this issue?
0
0
46
1w