Hello,
I'm experiencing a navigation bar positioning issue with my UIKit iPad app on iPadOS 26 (23A340) using Xcode 26 (17A321).
The navigation bar positions under the status bar initially, and after orientation changes to landscape, it positions incorrectly below its expected location. This occurs on both real device (iPad mini A17 Pro) and simulator. My app uses UIKit + Storyboard with a Root Navigation Controller.
A stack overflow post has reproduce the bug event if it's not in the same configuration: https://stackoverflow.com/questions/79752945/xcode-26-beta-6-ipados-26-statusbar-overlaps-with-navigationbar-after-presen
I have checked all safe areas and tried changing some constraints, but nothing works.
Have you encountered this bug before, or do you need additional information to investigate this issue?
UIKit
RSS for tagConstruct and manage graphical, event-driven user interfaces for iOS or tvOS apps using UIKit.
Posts under UIKit tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Code that disables a tab bar item via UITabBarItem.isEnabled = false used to both grey out the item and block taps on iOS 18. On iOS 26, the item often remains tappable and selectable, even though isEnabled is set to false. This looks like a behavior change or regression.
func disableTabbarItems(tabbar: UITabBarController, isEnable: Bool, index: Int) {
if let tabItems = tabbar.tabBar.items, index < tabItems.count {
let tabItem = tabItems[index]
tabItem.isEnabled = isEnable
}
}
iOS 18
iOS 26
Code that disables a tab bar item via UITabBarItem.isEnabled = false used to both grey out the item and block taps on iOS 18. On iOS 26, the item often remains tappable and selectable, even though isEnabled is set to false. This looks like a behavior change or regression.
func disableTabbarItems(tabbar: UITabBarController, isEnable: Bool, index: Int) {
if let tabItems = tabbar.tabBar.items {
let tabItem = tabItems[index] tabItem.isEnabled = isEnable
}

}

Hi all,
I’m subclassing UITextView and overriding insertText(_:) to intercept and log input:
class TWTextView: UITextView {
override func insertText(_ text: String) {
print("insertText() : \(text)")
super.insertText(text)
}
}
This works fine, but I’ve noticed that insertText(_:) is invoked both when:
The user types something in the text view (via hardware/software keyboard).
I programmatically call myTextView.insertText("Hello") from my own code.
I’d like to be able to distinguish between these two cases — i.e., know whether the call was triggered by the user or by my own programmatic insert.
Is there any recommended way or system-provided signal to differentiate this?
Thanks in advance!
I have a simple task, to measure the height of the overlapping area occupied by the keyboard in the current view. In the attached images, I use it to position a UITextView (red) above the keyboard, as a test.
The keyboard displays an inputAccessoryView (yellow) when editing a text view, but it’s also summoned by a UIFindInteraction, which shows a search bar above the keyboard. When measuring the keyboard, I need to account for either the accessory view or the search bar, basically, the total keyboard height including any extra views above it.
I use the usual algorithm: the keyboard frame from UIResponder.keyboardWillShowNotification (documented as being in screen coordinates) is converted to my view’s coordinates and intersected with the view’s bounds to get the overlapping height.
The first issue: in windowed mode, the keyboard frame reports a negative origin.x (e.g. -247), even though in screen coordinates it should start at 0. I display the raw frame in the navbar, as shown in the first screenshot.
I then suspected the frame might be in window coordinates on iOS 26, but repositioning the window a few times, and switching between find interaction keyboard and text editing keyboard, sometimes yields a positive origin.x instead, as if the keyboard starts from the middle of the screen!? (see the second screenshot).
And in some cases, the raw keyboard height is even 0, despite the keyboard clearly being visible and taking space (third screenshot).
Interestingly, the reported frame for the search keyboard is always consistent and in screen coordinates, but the default keyboard frame just doesn’t make sense.
I currently have a SwiftUI TabView that has 5 Tab's. The first tab has a UIScrollView in a UIViewRepresentible with scrollView.scrollsToTop = false and that works fine for when the user hits the navigation bar, however if the user taps the first tab when it is already selected my UIScrollView scrolls to top.
My UIScrollView is essentially 5 views, a center view, top, bottom, right, and left view. All views except for the center are offscreen but available for the user to scroll horizontal or vertical (and the respective views get updated based on the new center view).
The issue I have is that clicking the first tab when its already selected, sets the content offset (for the y axis) to 0, which messes me up 2x, first it scrolls up but since its not really scrolling the right, left, and upper views dont exist, which makes the user think it can't be scrolled or it's broken.
For now I subclassed UIScrollView like this
class NoScrollToTopScrollView: UIScrollView {
override func setContentOffset(_ contentOffset: CGPoint, animated: Bool) {
if contentOffset.y == .zero {
// Ignore SwiftUI’s re-tap scroll-to-top
return
}
super.setContentOffset(contentOffset, animated: animated)
}
}
which seems to work, but I'm just wondering if there is a better way to do this, or maybe a way to disable SwiftUI Tab from doing its default action which can help with a SwiftUI ScrollView as well?
In our app we launch landscape only player view controller from portrait only view controller. This is done using present(playerViewController, animated:true) and it is dismissed using dismiss() api. This is working fine till iOS 18 but broken in iOS 26. Now when presenting the presented viewcontrollers UI is realigning / resizing after the view is visible and while dismissing the presenting view controller is realigning after the view is visible. Anyone else seeing it or how to fix this?
I have a triple-column UISplitViewController setup in "tile" mode. Each of the 3 columns has a table view controller. Under iPadOS 26, the section headers and row selection in the middle table extends all the way to the left of the screen, behind the primary column. It looks terrible. The documentation for "Adopting Liquid Glass" makes it sound like you can add this behavior by using UIBackgroundExtensionView. But I get this behavior automatically in a UISplitViewController. How do I turn this off?
I created a simpler sample using a double-column split view with two table view controllers. Here's a screenshot of the result:
Note how the section headers and the row selection appear all the way to the left edge of the screen. I don't want that effect. How do you turn off this effect in a UISplitViewController?
Here is the code used to setup the split view and the app's main window:
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let winScene = (scene as? UIWindowScene) else { return }
let primary = PrimaryViewController(style: .plain)
let primaryNC = UINavigationController(rootViewController: primary)
let detail = DetailViewController(style: .plain)
let detailNC = UINavigationController(rootViewController: detail)
let sv = UISplitViewController(style: .doubleColumn)
sv.preferredDisplayMode = .oneBesideSecondary
sv.preferredSplitBehavior = .tile
sv.primaryBackgroundStyle = .none
sv.displayModeButtonVisibility = .automatic
sv.setViewController(primaryNC, for: .primary)
sv.setViewController(detailNC, for: .secondary)
let win = UIWindow(windowScene: winScene)
win.rootViewController = sv
win.makeKeyAndVisible()
window = win
}
The PrimaryViewController and DetailViewController are simple UITableViewController subclasses that only add a few rows and section headers as needed.
My app start up has became horrid. It takes 1 minute to open SQLlite database for my rust core. Impossible to work...
I have Address Sanitizer, Thread Perf Checker and Thread Sanitizer disabled...
After updating to Xcode 26 my XCUITests are now failing as during execution exceptions are being raised and caught by my catch all breakpoint
These exceptions are only raised during testing, and seem to be referencing some private internal property. It happens when trying to tap a button based off an accessibilityIdentifier
e.g.
accessibilityIdentifier = "tertiary-button"
...
...
app.buttons["tertiary-button"].tap()
The full error is:
Thread 1: "[<UIKit.ButtonBarButtonVisualProvider 0x600003b4aa00> valueForUndefinedKey:]: this class is not key value coding-compliant for the key _titleButton."
Anyone found any workarounds or solutions? I need to get my tests running on the liquid glass UI
This is really odd. If you setup a UISearchController with a preferredSearchBarPlacement of .stacked and you setup the search bar with scope buttons, then when the view controller is initially displayed, the currently hidden scope buttons block touch events from reaching the main view just below the search bar. But once the search is activated and dismissed, then the freshly hidden scope buttons no longer cause an issue.
This is easily demonstrated by putting a UITableViewController in a UINavigationController. Setup the table view to show a few simple rows. Then setup a search controller using the following code:
func setupSearch() {
// Setup a stacked search bar with scope buttons
// Before the search is ever activated, the hidden scope buttons block any touches in the main view controller
// in the area just below the search bar.
// Once the search is activated and dismissed, the problem goes away. It seems that displaying and hiding the
// scope buttons at least once fixes the issue that exists beforehand.
// This issue only exists in iOS/iPadOS 26, not iOS/iPadOS 18 or earlier.
let search = UISearchController(searchResultsController: UIViewController())
search.hidesNavigationBarDuringPresentation = true
search.obscuresBackgroundDuringPresentation = true
search.scopeBarActivation = .onSearchActivation // Ensure button appear immediately
let searchBar = search.searchBar
searchBar.scopeButtonTitles = [ "One", "Two", "Three" ]
self.navigationItem.searchController = search
self.navigationItem.hidesSearchBarWhenScrolling = false // Issue appears even if this is true
self.navigationItem.preferredSearchBarPlacement = .stacked
}
When first shown, before any attempt is made to activate the search, any attempt to tap on the upper 2/3 of the first row in the table view (which is just below the search bar) fails. If you tap on the lower 1/3 of the first row it works fine. If you then activate the search (now the scope buttons appear) and then dismiss the search (now the scope buttons are hidden again), then there is no issue tapping anywhere on the first row of the table. But if you restart the app, the problem starts over again.
This problem happens on any iPhone or iPad, real or simulated, running iOS/iPadOS 26 RC. This is a regression from iOS 18 or earlier.
When trying to use a UISearchController setup with a UISearchBar that has scope buttons, the search controller's scopeBarActivation property is set to .onSearchActivation, the navigation item's preferredSearchBarPlacement property is set to .integrated. or .integratedButton, and the search bar/button appears in the navigation bar, then the scope buttons never appear. But space is made for where they should appear.
Some relevant code in a UIViewController shown as the root view controller of a UINavigationController:
private func setupSearch() {
let sc = UISearchController(searchResultsController: UIViewController())
sc.delegate = self
sc.obscuresBackgroundDuringPresentation = true
// Setup search bar with scope buttons
let bar = sc.searchBar
bar.scopeButtonTitles = [ "One", "Two", "Three", "Four" ]
bar.selectedScopeButtonIndex = 0
bar.delegate = self
// Apply the search controller to the nav bar
navigationItem.searchController = sc
// BUG - Under iOS/iPadOS 26 RC, using .onSearchActivation results in the scope buttons never appearing at all
// when using integrated placement in the nav bar.
// Ensure the scope buttons appear immediately upon activating the search controller
sc.scopeBarActivation = .onSearchActivation
// This works but doesn't show the scope buttons until the user starts typing - that's too late for my needs
//sc.scopeBarActivation = .automatic
if #available(iOS 26.0, *) {
// Under iOS 26 put the search icon in the nav bar - same issue for .integrated and .integratedButton
navigationItem.preferredSearchBarPlacement = .integrated // .integratedButton
// My toolbar is full so I need the search in the navigation bar
navigationItem.searchBarPlacementAllowsToolbarIntegration = false // Ensure it's in the nav bar
} else {
// Under iOS 18 put the search bar in the nav bar below the title
navigationItem.preferredSearchBarPlacement = .stacked
}
}
I need the search bar in the navigation bar since the toolbar is full. And I need the scope buttons to appear immediately upon search activation.
This problem happens on any real or simulated iPhone or iPad running iOS/iPadOS 26 RC.
Steps to reproduce:
Create a default document-based app for iOS using SwiftUI or UIKit with UIDocumentViewController.
In the document loading method, simulate an error by throwing an exception, for example: throw CocoaError(.coderValueNotFound)
Open the app on device/simulator running iOS 18 and attempt to open or create a new document.
Expected behavior:
An appropriate error message should be displayed to the user.
Actual behavior:
No error message is shown to the user
The "Create Document" button becomes permanently disabled
The app appears to hang or become unresponsive
Environment:
iOS 18, 26 beta 9
Both UIKit and SwiftUI implementations affected
Has anyone encountered this issue or found a workaround?
This seems like a regression in iOS 18's document handling.
FB20189617, FB20189669
We have an application WAVE PTT(Push to talk) and
Application is in foreground state, When a user receives a cellular call and it is in the "ringing" state and application receives a VoIP APNS(video call) which is reported to CallKit.
User rejects the Cellular call from CallKit UI, application Video call is also getting rejected (separate feedback - 19017978) and Here the issue is observed that an Application moved to background(OS26 beta 9).
Issue is not observed in iOS 18 and older versions.
Frequency : 1 out of 3.
Please refer the sysdiagnose logs in below reported feedback ID.
Feedback Ticket ID: 20187309
Syslogs Snippet reference:
default 2025-09-10 12:30:06.991950 +0530 WAVE PTX 0x10e078100 - ApplicationStateTracker: UISceneDidEnterBackground
Hello,
I am building a UIKit application where I need to handle key events in a UITextField with the following requirements:
Normal key presses (e.g. A, B, etc.) should insert characters into the text field.
A hotkey combination (Ctrl+K) should trigger a custom computation that runs on a background thread, and once completed, its result (e.g. $) should be inserted into the text field.
All events (normal keys and hotkeys) must appear in the exact order they were pressed by the user. For example:
If the user types A, B, then Ctrl+K, the field should show AB$.
If the user types A, Ctrl+K, C, the field should show A$C, even if the computation for $ takes longer.
I want strict sequential processing: no later keystroke should be inserted until an earlier hotkey computation finishes.
I have tried overriding pressesBegan(_:with:) in a custom UITextField subclass, and I can detect both normal keys and Ctrl+K.
Questions:
Is there a recommended UIKit API or pattern for handling this kind of ordered key event processing with hotkeys?
Are there best practices for mixing UI updates with background computations in this context, while preserving event order?
Thanks!
Hi,
I came across the following API:
@MainActor
func placeCursor(at position: UITextPosition!, animated: Bool)
From the signature, it seems intended to move the insertion point (caret) to a given UITextPosition, with an option for animation.
However, UITextView and UITextField don’t seem to expose this method as a public member — calling it gives the error:
Value of type 'UITextView' has no member 'placeCursor'
My questions are:
Is placeCursor(at:animated:) a public, supported API that we can safely use in apps?
If not, what is the Apple-recommended way to programmatically move the cursor without animation?
Right now, I only know of updating selectedTextRange, which works but doesn’t involve this placeCursor method. I want to confirm if placeCursor is meant for developer use or is an internal/private API.
Thanks!
When UIStatusBarHidden is set to YES, the navigation bar is displayed in the wrong vertical position immediately after app launch. The layout only corrects itself after the device orientation changes (e.g., rotation).
Steps to Reproduce:
Create a new app with a navigation controller.
Set UIStatusBarHidden = YES in Info.plist.
Launch the app.
Expected Result:
The navigation bar should appear in the correct position immediately after launch.
Actual Result:
The navigation bar is misaligned on first launch, and only moves to the correct position after rotating the device.
I’m trying to keep a specific row visually stable while the data backing a ScrollView changes.
Goal
1. Before updating model.items, capture the top row’s offset relative to the scroll view.
2. Mutate the observable state so SwiftUI recomputes layout — but don’t draw yet.
3. Read the new layout, compute the delta, and adjust the scroll position so the previously visible row stays put.
4. Only then draw the new frame.
Reduced example
@Observable
final class SomeModel {
var items: [SomeItem] = [/* ... */]
}
struct MyBox: View {
@Environment(SomeModel.self) private var model
var body: some View {
ScrollView {
VStack {
ForEach(model.items, id: \.id) { item in
Color.red.frame(height: randomStableHeight(for: item.id))
}
}
}
}
}
// Elsewhere:
let oldRow = recordOldRow() // capture the row to stabilize
model.items = generateNewItems() // mutate model (invalidates layout)
let newPos = capturePreviousRowNewPosition(oldRow) // read new layout?
restoreScrollPosition() // adjust so oldRow stays visually fixed
// draw now
Is that pipeline achievable in SwiftUI? If not, what’s the supported way to keep a row visually stable while the list updates?
I have been banging my head against this problem for a bit now.
I am trying to build a bidirectional, infinitely scrolling list that implements these core requirements:
Loads data up/down on the fly as the user scrolls
Preserves scroll velocity as the list is updated
Restores the scroll to the exact visual location after data has changed
Ensures no flicker when restoring scroll position - the user cannot know the list has updated and should continue scrolling as normal
Because LazyVStack does not play well with animations, I am opting to go with VStack and am implementing my own sliding window for data. This means that data can be removed as well as added, and a simple application of a height delta is not enough when restoring position.
So far I have tried many things:
Relying on ScrollPosition - simply does not work by itself as described (swift UI trying to keep the position stable with ID's)
Relying on ScrollPosition.scrollTo - only kind of works with ID, no way to restore position with pixel perfect accuracy
Intercepting the UIKit scrollView instance, using it to record and access the top row's position, mutating data and then queuing a scroll restoration using CATransaction.setCompletionBlock - this is the closest I've come, and it satisfies the top 3 requirements but sometimes I get a flicker on slightly heavier lists
What I would really like, is a way of using ScrollView and granularly hooking into the lifecycle of the view after layout, and just before draw. At this point I would update the relevant scroll positions, and allow draw to continue. Is this possible? My knowledge is very limited at this point, but I believe I may be able to achieve something of the sort by swizzling layerWillDraw? Does this make sense, and is it prudent?
In general, I'm very interesting in hearing what people have to say about the above, as well as this problem in general.
Hello,
I'm facing issues when using prefersLargeTitles on iOS26, as you can see in the UI hierarchy, the largeTitle is assigned to a UINavigationBarLargeTitleView but not in the UINavigationBar. On the other hand, iOS18 we only have the navigationBar largeTitle.
Is this an identified issue, how can I fix it? We set the title and set prefersLargeTitles to true, do you know any reason this happens?
Additionally, if I set the navigationBar.isTranslucent to false the extra NavigationBarLargeView in the TableView is non-existent.
Thank you!
iOS26
iOS18