I've got a Catalyst app that exposes some custom context menu items via the buildMenu API. When it runs on Tahoe, there's some weirdness with how the images in the menu items are sized. See attached screenshot below.
The three items on the bottom are using SF Symbols for their images, and the rest are using custom images from an asset catalog.
Is this a bug in Tahoe 26.0? Or should I be resizing my images before giving them to UIAction? If the latter, what should the size be, and is this documented somewhere or available from an API?
Explore the various UI frameworks available for building app interfaces. Discuss the use cases for different frameworks, share best practices, and get help with specific framework-related questions.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
When I add a TextField with @FocusState to a toolbar, I noticed that setting focus = false doesn't cause the form to lose focus
If I move the TextField out of the toolbar setting focus = false works fine. How can I unfocus the text field when the cancel button is tapped?
Minimal example tested on Xcode Version 26.0 beta 6 (17A5305f):
import SwiftUI
struct ContentView: View {
@State private var text: String = ""
@FocusState private var focus: Bool
var body: some View {
NavigationStack {
List {
Text("Test List")
}
.toolbar {
ToolbarItem(placement: .bottomBar) {
TextField("Test", text: $text)
.padding(.horizontal)
.focused($focus)
}
ToolbarItem(placement: .bottomBar) {
Button(role: .cancel) {
focus = false // THIS DOESN'T WORK!
}
}
}
}
}
}
#Preview {
ContentView()
}```
We’ve recently updated our app to adopt the native iOS 26 tab bar. Since then, we’ve started seeing crashes on iOS 26 devices with swift_getObjectType appearing in the stack.
I’ve reviewed the logs in Organizer but couldn’t find anything conclusive. The issue seems isolated to iOS 26 and doesn’t reproduce on earlier versions.
com.grofers.consumer_issue_2cc3a4a209ab2b47bfbdab919a320fa7_crash_session_68148be54ef5441fac56d3138d055bac_DNE_5_v2_stacktrace.txt
I have a TabView (no modifiers) as the top-level view in my app. Starting with iOS 26 it starts off partially "under" the Status Bar, and then repositions if I switch between apps.
Starting Point
After Switching To/From Another App
In the simulator, pressing "Home" and then reopening the app will fix it.
Anyone else seeing something similar? Is there a modifier I'm missing on TabView that might prevent this behaviour?
Thanks!
I have an NSSplitViewController with three columns:
sidebar
full-height content view with NSScrollView/NSTableView
detail view.
There's no (visible) titlebar and no toolbar.
This layout has worked fine for years, but in Tahoe an unwanted overlay (~30-50px high) appears at the top of any column containing a scroll view with table content. Xcode suggests it's an NSScrollPocket.
My research suggests it...
Only affects columns with NSScrollView
Plain NSView columns are unaffected
Overlay height varies (~50px or ~30px depending on how I mess with title / toolbar settings)
Disabling titlebar/toolbar settings reduces but doesn't eliminate the overlay
The overlay obscures content and there doesn't appear to be any API
to control its visibility. Is this intended behavior, and if so, is
there a way to disable it for applications that don't need this UI
element?
If it helps visualise the desired result, the app is https://indigostack.app
Any guidance would be appreciated!
Topic:
UI Frameworks
SubTopic:
AppKit
Some character display on iOS 26 cause crash
String sample
Crash stack
I am encountering a critical issue where a custom background image on a UIToolbar fails to display when the app is built with Xcode 26 and run on iOS 26 beta. The exact same implementation works perfectly on iOS 18 and earlier versions.
We first attempted to use the legacy setBackgroundImage method, which fails to render the image on iOS 26:
// 1. Get Navigation Bar and set basic properties
UINavigationBar* navBar = self.navigationBar;
navBar.hidden = NO;
navBar.translucent = NO;
// 2. Setup the UIToolbar instance
UIToolbar *toolBar = [[UIToolbar alloc] initWithFrame:navBar.bounds];
toolBar.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
// 3. Set the resizable image (This image does not appear on iOS 26)
UIImage* imagePortrait = [UIImage imageNamed:@"nav_bg"];
UIEdgeInsets insets = UIEdgeInsetsMake(0.f, 6.f, 0.f, 6.f);
[toolBar setBackgroundImage:[imagePortrait resizableImageWithCapInsets:insets]
forToolbarPosition:UIToolbarPositionAny
barMetrics:UIBarMetricsDefault];
We then migrated to the recommended modern UIToolbarAppearance to solve this, but the issue persists:
// 1. Prepare Image
UIImage* imagePortrait = [UIImage imageNamed:@"nav_bg"];
// Insets are applied via resizableImageWithCapInsets: (not shown in this snippet but implied)
// 2. Configure UIToolbarAppearance
UIToolbarAppearance *appearance = [[UIToolbarAppearance alloc] init];
appearance.backgroundImage = imagePortrait; // The image is correctly loaded (not nil)
// 3. Apply the Appearance
toolBar.standardAppearance = appearance;
// We also applied to scrollEdgeAppearance and compactAppearance.
Any information or recommended workarounds for displaying a custom background image on UIToolbar in the latest iOS 26 would be highly appreciated.
Hi,
I have a UIViewController that contains a UITextField I am presenting that view controller inside SwiftUI using a UIViewControllerRepresentable and I am able to interact with the text field fine and the view controller lifecycle executes normally if the representable is not presented on any SwiftUI container that internally uses a scroll view on the other hand if I put the representable view inside a SwiftUI view that has a scroll view internally (when the UIKit hierarchy is generated) the text field does not respond to interaction anymore and the only view controller lifecycle method invoked is the viewDidLoad from my view controller the other methods are not executed.
Anyone knows if this is a bug on SwiftUI or if there is any additional setup necessary for UIViewControllerRepresentables?
Thanks in advance.
Hi everyone,
I have the following issue that I have tried to tweak every possible modifier of ScrollView and still got the same result in iOS 26.
Description:
Create a SwiftUI ScrollView with scrollTargetBehavior of paging, also create a bottom UI view below the ScrollView.
If the starting index is not 0, the position of current page will be off with part of previous page shown above it.
It only happens on iOS 26, not on iOS 18.
Also if bottom UI view (text view in this case) is removed, it also works fine.
I want to see if there is a solution for it or it's an iOS 26 bug. Thanks!
import SwiftUI
struct ContentView: View {
@State private var currentPageIndex: Int? = 3
var body: some View {
VStack {
scrollView
Text("Bottom Bar")
.frame(maxWidth: .infinity)
.frame(height: 80)
.background(.red)
}
.background(.black)
}
@ViewBuilder
var scrollView: some View {
VerticalPagerView(
currentPageIndex: $currentPageIndex,
itemCount: 10,
content: Array(0...9).map { index in
content(for: index)
}
)
}
@ViewBuilder
private func content(for index: Int) -> some View {
// Empty view with random background color
Color(
red: Double((index * 25 + 0) % 255) / 255.0,
green: Double((index * 25 + 80) % 255) / 255.0,
blue: Double((index * 25 + 160) % 255) / 255.0
)
}
}
struct VerticalPagerView<Content: View>: View {
@Binding private var currentPageIndex: Int?
private let itemCount: Int
private let content: [Content]
init(
currentPageIndex: Binding<Int?>,
itemCount: Int,
content: [Content]
) {
self._currentPageIndex = currentPageIndex
self.itemCount = itemCount
self.content = content
}
var body: some View {
GeometryReader { geometryReader in
ScrollViewReader { reader in
ScrollView(.vertical) {
LazyVStack(spacing: 0) {
ForEach(0 ..< itemCount, id: \.self) { index in
content[index]
.id(index)
.containerRelativeFrame(.vertical, alignment: .center)
.clipped()
}
}
.frame(minHeight: geometryReader.size.height)
.scrollTargetLayout()
}
.scrollIndicators(.hidden)
.onAppear {
guard let currentPageIndex = currentPageIndex else { return }
reader.scrollTo(currentPageIndex, anchor: .center)
}
}
.scrollPosition(id: $currentPageIndex, anchor: .center)
.ignoresSafeArea()
.scrollTargetBehavior(.paging)
.onChange(of: currentPageIndex) { oldIndex, newIndex in
}
}
}
}
Hi community:
I noticed that each closure is counted as lines in code coverage (unit tests) (Xcode 14.1.0) in a swiftUI File. I mean, If you coded and VStack that involves another HStack, and HStack contains 4 lines, and the VStack contains 6 lines counting the HStack. The total executable lines should be 6 (6 lines in the file). But Xcode count 10, counting twice the HStack lines.
Is it a bug, or is it correct? You know, I don't know if Apple has another concept about executable lines.
Also, Is it possible to remove previews with any configuration from code coverage or constant files?
Thanks for all.
Hi Apple Team and community,
We've noticed a change in how UITableView separators are rendered in iOS 26 (tested using Xcode 26.0), and we'd like to confirm if this is an intentional behaviour change or a potential bug.
Issue Description
In a .plain-style UITableView, the top separator line above the first cell in each section is no longer rendered in iOS 26. We've confirmed that this separator is also absent from the view hierarchy.
This issue did not occur in previous iOS versions (e.g., iOS 18), where the top separator above the first cell of a section was rendered as expected.
The issue doesn't occur for UITableView with no sections.
Expected Behavior
When using a .plain style UITableView, the standard top separator should appear above the first cell of each section, as part of the default system rendering.
Actual Behavior
In iOS 26, this top separator is missing, even though the rest of the separators render normally.
Environment
iOS version: iOS 26 (Simulator)
Xcode version: Xcode 26.0
Tested using: UIKit with Swift, both Storyboard and programmatic view setups
Sample app and screenshots:
Drive link: https://drive.google.com/drive/folders/1aoXeFHO_Sya-6Rvp0fZ0s2V4KLQucRMb?usp=sharing
Questions:
Is this a known change in rendering behavior for UITableView in iOS 26?
If not, is anyone else experiencing the same issue? We'd appreciate any insights or potential workarounds to restore the top separator in .plain-style table views.
Any clarification or guidance would be appreciated.
Thanks in advance!
When disabling the opacity slider of color panels, my app crashes with unsatisfiable layout constraints. Feel free reproduce with a minimal test project: A macOS app based on the Xcode 26.0 template with only one line added to the ViewController's viewDidLoad() function:
NSColorPanel.shared.showsAlpha = false
The issue doesn't occur if this property is set to "true" or not set at all.
I just filed a corresponding bug report (FB20269686), although I don't expect any feedback from Apple ... as numerous issues I reported were never updated or commented at all (after migrating from RADARs).
Topic:
UI Frameworks
SubTopic:
AppKit
Help,I have encountered a thorny problem! In systems with iOS 16.5 and above, there is a probability that the keyboard will not disappear after it appears. And once it appears, unless the app is restarted, all places where the keyboard is used cannot be closed.
I have tried using the forced shutdown method [UIView endEditing:YES], but it didn't work. When this exception occurs, I notice that there will be two UITextEffectsWindow at the same time.
Does anyone know how to solve it?
On an iPad running iOS26, there is an issue with the numberPad keyboard
I have a UITextField with a keyboard type of .numberPad
When I first tap in the field, a new number pad with just numbers (similar to the one that shows up on iPhone) shows up.
When I tap again in the field, that number pad goes away.
When I tap in the field again, the full keyboard with numbers etc shows up (this is the one that used to always show up pre-iOS26)
Topic:
UI Frameworks
SubTopic:
UIKit
Hello,
I have been receiving crash reports on iOS 26 related to a view containing a UITextField. Although I have not been able to reproduce the issue locally and the exact reproduction steps are unknown, the call stack suggests the crash may be related to language or input method changes.
If anyone has encountered a similar crash on iOS 26 or has any insights regarding language/input-related issues impacting UITextField behavior, your help would be greatly appreciated. The call stack from the reports is attached below.
Exception
NSInvalidArgumentException
-[__NSPlaceholderArray initWithObjects:count:]
attempt to insert nil object from objects[1]
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0xc98c8 __exceptionPreprocess
1 libobjc.A.dylib 0x317c4 objc_exception_throw
2 CoreFoundation 0xe1d7c -[__NSPlaceholderArray initWithObjects:count:]
3 CoreFoundation 0x1485d0 +[NSArray arrayWithObjects:count:]
4 UIKitCore 0xfc4d44 -[UIInlineInputSwitcher updateInputModes:withHUD:]
5 UIKitCore 0xfc4fe0 -[UIIndicatorInputSwitcher switchMode:withHUD:withDelay:]
6 UIKitCore 0xfc31d4 -[UIInputSwitcher showsLanguageIndicator:]
7 UIKitCore 0xa16dc8 __140-[_UIKeyboardStateManager _setupDelegate:delegateSame:hardwareKeyboardStateChanged:endingInputSessionIdentifier:force:delayEndInputSession:]_block_invoke_4
8 libdispatch.dylib 0x1abc _dispatch_call_block_and_release
9 libdispatch.dylib 0x1b7cc _dispatch_client_callout
10 libdispatch.dylib 0x38af0 _dispatch_main_queue_drain.cold.5
11 libdispatch.dylib 0x10ea8 _dispatch_main_queue_drain
12 libdispatch.dylib 0x10de4 _dispatch_main_queue_callback_4CF
13 CoreFoundation 0x6b520 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
14 CoreFoundation 0x1dd14 __CFRunLoopRun
15 CoreFoundation 0x1cc44 _CFRunLoopRunSpecificWithOptions
16 GraphicsServices 0x1498 GSEventRunModal
17 UIKitCore 0xaa6d8 -[UIApplication _run]
18 UIKitCore 0x4ec24 UIApplicationMain
Thank you!
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.
I have something that looks like:
NavigationStack {
List(self.items, id: \.self, selection: self.$selectedItems) { item in
NavigationLink {
ItemView(item: item)
.environment(\.managedObjectContext, self.viewContext)
} label: {
LabelWithMenuView(object: item) { ptr in
self.labelHandler(item: item, newName: ptr)
}
}
}
if self.editMode?.wrappedValue == .active {
editButtons
} else {
TextField("Add Item", text: self.$newItem)
.onSubmit {
self.addItem()
self.newItem = ""
}
.padding()
}
}
#if os(iOS)
.toolbar {
EditButton()
}
.onChange(of: self.editMode?.wrappedValue) { old, new in
print("editMode \(old) -> \(new)")
}
#endif
With that layout, the edit button doesn't show up at all; if I put it as part of the List, it does show up, but the first click doesn't do anything; after that, it works, but the onChange handler doesn't show it getting changed, and the editButtons don't go away.
We're attempting to upgrade to XCode 16 but are encountering a consistent crash when doing so.
The actual exception message comes from the UICollectionView, with this message and stack trace.
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single view is dequeued and returned to the collection view. Avoid dequeuing views without a request from the collection view. For retrieving an existing view in the collection view, use -[UICollectionView cellForItemAtIndexPath:] or -[UICollectionView supplementaryViewForElementKind:atIndexPath:]. Dequeued view: <Redacted: 0x17831f080; baseClass = UICollectionViewCell; frame = (16 923.667; 408 450); layer = <CALayer: 0x6000004ad680>>; Collection view: <UICollectionView: 0x10ca67000; frame = (0 0; 440 809.667); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x600000d41e60>; backgroundColor = <UIDynamicProviderColor: 0x600000285640; provider = <__NSMallocBlock__: 0x600000c7aac0>>; layer = <CALayer: 0x600000322400>; contentOffset: {0, 139.66666666666666}; contentSize: {440, 3247.625}; adjustedContentInset: {0, 0, 34, 0}; layout: <UICollectionViewCompositionalLayout: 0x15a8732a0>; dataSource: <_TtGC5UIKit34UICollectionViewDiffableDataSourceOC8Redacted_: 0x60000000ead0>>'
*** First throw call stack:
(
0 CoreFoundation 0x00000001804b910c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x0000000180092da8 objc_exception_throw + 72
2 Foundation 0x0000000180e67c70 _userInfoForFileAndLine + 0
3 UIKitCore 0x00000001852348a4 __43-[UICollectionView _updateVisibleCellsNow:]_block_invoke.445 + 136
4 UIKitCore 0x0000000185b2a42c -[_UICollectionViewSubviewManager removeAllDequeuedViewsWithEnumerator:] + 188
5 UIKitCore 0x000000018523436c -[UICollectionView _updateVisibleCellsNow:] + 4000
6 UIKitCore 0x0000000185234288 -[UICollectionView _updateVisibleCellsNow:] + 3772
7 UIKitCore 0x0000000185239174 -[UICollectionView layoutSubviews] + 284
8 UIKitCore 0x00000001860a3418 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2404
9 QuartzCore 0x000000018b335624 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 432
10 QuartzCore 0x000000018b3403f8 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 124
11 QuartzCore 0x000000018b272430 _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 464
12 QuartzCore 0x000000018b2a0c70 _ZN2CA11Transaction6commitEv + 652
13 QuartzCore 0x000000018b2a21c4 _ZN2CA11Transaction25flush_as_runloop_observerEb + 68
14 UIKitCore 0x0000000185b302fc _UIApplicationFlushCATransaction + 48
15 UIKitCore 0x0000000185a60eb4 __setupUpdateSequence_block_invoke_2 + 352
16 UIKitCore 0x00000001850a5cec _UIUpdateSequenceRun + 76
17 UIKitCore 0x0000000185a60858 schedulerStepScheduledMainSection + 168
18 UIKitCore 0x0000000185a5fc90 runloopSourceCallback + 80
19 CoreFoundation 0x000000018041d294 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
20 CoreFoundation 0x000000018041d1dc __CFRunLoopDoSource0 + 172
21 CoreFoundation 0x000000018041c99c __CFRunLoopDoSources0 + 324
22 CoreFoundation 0x0000000180416e84 __CFRunLoopRun + 788
23 CoreFoundation 0x00000001804166f4 CFRunLoopRunSpecific + 552
24 UIFoundation 0x0000000184c5c0c0 -[NSHTMLReader _loadUsingWebKit] + 1416
25 UIFoundation 0x0000000184c5cbe8 -[NSHTMLReader attributedString] + 20
26 UIFoundation 0x0000000184bdc3c8 _NSReadAttributedStringFromURLOrDataCommon + 2760
27 UIFoundation 0x0000000184bd82d4 _NSReadAttributedStringFromURLOrData + 180
28 UIFoundation 0x0000000184bd81b8 -[NSAttributedString(NSAttributedStringUIFoundationAdditions) initWithData:options:documentAttributes:error:] + 144
29 Redacted.debug.dylib 0x000000010f53b6d0 $sSo25NSMutableAttributedStringC4data7options18documentAttributesAB10Foundation4DataV_SDySo012NSAttributedC24DocumentReadingOptionKeyaypGSAySo12NSDictionaryCSgGSgtKcfcTO + 204
30 Redacted.debug.dylib 0x000000010f53a984 $sSo25NSMutableAttributedStringC4data7options18documentAttributesAB10Foundation4DataV_SDySo012NSAttributedC24DocumentReadingOptionKeyaypGSAySo12NSDictionaryCSgGSgtKcfC + 76
31 Redacted.debug.dylib 0x000000010f53a860 $sSS8RedactedE20htmlAttributedStringSo09NSMutablecD0CSgyF + 572
32 Redacted.debug.dylib 0x000000010fbddf54 $s8Redacted + 132
33 Redacted.debug.dylib 0x000000010fbde71c $s8Redacted + 196
34 Redacted.dylib 0x000000010f75b1d0 $s8Redacted + 544
35 Redacted.dylib 0x000000010f2ca174 $s8Redacted + 2052
36 Redacted.debug.dylib 0x000000010e7e6884 $s8Redacted 37 Redacted.debug.dylib 0x000000010e7de9f0 $s8Redacted + 2376
38 Redacted.debug.dylib 0x000000010f336820 $s8Redacted 39 UIKitCore 0x0000000184f0c3e8 block_destroy_helper.22 + 18032
40 UIKitCore 0x0000000184f109a4 block_destroy_helper + 11080
41 UIKitCore 0x0000000184f0e810 block_destroy_helper + 2484
42 UIKitCore 0x00000001851aa8f0 -[__UIDiffableDataSource collectionView:cellForItemAtIndexPath:] + 136
libc++abi: terminating due to uncaught exception of type NSException
The collection view cell being dequed contains a string that is created from HTML content with NSMutableAttributedString
This line is where execution stop
data: data,
options: [.documentType: NSAttributedString.DocumentType.html],
documentAttributes: nil
)
This code has worked fine for years but now inexplicably is crashing. I've seen various similiar posts related to iOS 18 but none with a resolution
UITextView crash when setting attributed text that contains substring ffi and attributedText contains NSFontAttributeName, NSForegroundColorAttributeName
Reproducible case:
UITextView *textView = [[UITextView alloc] init];
textView.attributedText = [[NSAttributedString alloc] initWithString:@"ffi" attributes:@{
NSParagraphStyleAttributeName: [self createParagraphOfLineHeight:20],
NSFontAttributeName: [UIFont systemFontOfSize:fontSize weight:UIFontWeightRegular],
NSForegroundColorAttributeName: UIColor.black
}];
It seems like it is no longer possible to open the main window of an app after the app has been launched by the system if the "Auto Start" functionality has been enabled.
I am using SMAppService.mainApp to enable to auto start of my app. It is shown in the macOS system settings and the app is automatically started - but the main window is not visible.
How can I change this behaviour so the main window of the app is always visible when started automatically?
I have not noticed this behaviour before the release of macOS Sequoia. My app is using Swift 6 and the latest version of macOS and Xcode.
Regards
Topic:
UI Frameworks
SubTopic:
SwiftUI