iOS simulator version 18.0+
I have a demo like this:
Menu {
Button {
} label: {
Text("Option 1")
Image(systemName: "star")
}
Button {
} label: {
Text("Option 2")
Image(systemName: "star")
}
} label: {
Text("Menu")
}
And I used the tool Accessibility Inspector to modify the text size.
Case 1:
We could see the option title and the star icon.
Case 2:
But we could not see the icon, only the option title here
Is this by design from Apple? Or does this need to be fixed? Does anyone know about my question?
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
I have a SwiftUI app. It fetches records through CoreData. And I want to show some records on a widget. I understand that I need to use AppGroup to share data between an app and its associated widget.
import Foundation
import CoreData
import CloudKit
class DataManager {
static let instance = DataManager()
let container: NSPersistentContainer
let context: NSManagedObjectContext
init() {
container = NSPersistentCloudKitContainer(name: "DataMama")
container.persistentStoreDescriptions = [NSPersistentStoreDescription(url: FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: group identifier)!.appendingPathComponent("Trash.sqlite"))]
container.loadPersistentStores(completionHandler: { (description, error) in
if let error = error as NSError? {
print("Unresolved error \(error), \(error.userInfo)")
}
})
context = container.viewContext
context.automaticallyMergesChangesFromParent = true
context.mergePolicy = NSMergePolicy(merge: .mergeByPropertyObjectTrumpMergePolicyType)
}
func save() {
do {
try container.viewContext.save()
print("Saved successfully")
} catch {
print("Error in saving data: \(error.localizedDescription)")
}
}
}
// ViewModel //
import Foundation
import CoreData
import WidgetKit
class ViewModel: ObservableObject {
let manager = DataManager()
@Published var records: [Little] = []
init() {
fetchRecords()
}
func fetchRecords() {
let request = NSFetchRequest<Little>(entityName: "Little")
do {
records = try manager.context.fetch(request)
records.sort { lhs, rhs in
lhs.trashDate! < rhs.trashDate!
}
} catch {
print("Fetch error for DataManager: \(error.localizedDescription)")
}
WidgetCenter.shared.reloadAllTimelines()
}
}
So I have a view model that fetches data for the app as shown above.
Now, my question is how should my widget get data from CoreData? Should the widget get data from CoreData through DataManager? I have read some questions here and also read some articles around the world. This article ( https://dev.classmethod.jp/articles/widget-coredate-introduction/ ) suggests that you let the Widget struct access CoreData through DataManager. If that's a correct fashion, how should the getTimeline function in the TimelineProvider struct get data? This question also suggests the same. Thank you for your reading my question.
I’m building a photo‑gallery view that mimics the iOS Photos app when it’s zoomed in to the maximum level: all years are displayed at once, with roughly 400 tiny thumbnails per page. The user experience of the system app is that the view is instantly visible, and scrolling keeps thumbnails instantly appearing.
I’ve already tried fetching thumbnails with PHImageManager and PHCachingImageManager, requesting the .fastFormat representation. However, the thumbnails still take several seconds to load, so the scrolling experience is noticeably laggy compared to the system app.
Is there another approach or technique—perhaps a different caching strategy, pre‑fetching, or a lower‑level API—that would allow me to retrieve and display thumbnails as quickly (or faster) than the native Photos app? Any guidance or code snippets would be greatly appreciated.
I tried to narrow down the y-axis and use the
clipped() to crop the excess. However, the clipped portion is too small, causing some of the chart to render above the x-axis. Is there any way to fix this, or any way to have the framework automatically set the y-axis range based on the data?
Hello,
I'm having a problem with the .glasseffect modifier in a view of a SwiftUI application. I have a list that starts with a static element, followed by several dynamic entries, and then another static element. I've applied the .glasseffect modifier to all the elements, and it works fine except for the first static element. I think I've figured out what's causing it. This element contains two date pickers, and if I comment one out, it works. As soon as both are present, I get a BAD_ACCESS_ERROR.
Oddly enough, this only happens on the tablet. Everything runs normally in the simulator. If I remove the .glassmodifier and use a normal background, it still works.
Is this a bug, or is it against Liquid Glass to have two date pickers in a stack and then use the .glasseffect modifier?
I was trying to figure out why my bottom sheet looks weird and doesn't have the "proper glass" look. I found that this issue seems to be new to iOS 26.1.
See the images below, they show the same view hierarchy (in this case UIHostingController configured as bottom sheet that has NavigationStack and content.
On iOS 26.1 there seems to be extra two layers of background - even though I am no adding any.
iOS 26:
iOS 26.1
Has anyone experienced something similar? Any workarounds? I am happy to completely disable the glass effect for this bottom sheet if it helps.
The screenshots show one sheet, but the same thing happens for another ones.
I have a Catalyst app on the App Store and I'm starting to get messages from users that the popover bubbles all over the app are without content. I see the error locally as well, but I don't know how to fix it.
I get the following warning in XCode when opening a popup:
UIScene property of UINSSceneViewController was accessed before it was set.
On macOS 15.2, any Mac Catalyst project that does not support portrait iPad orientation will no longer be able to successfully show the contents of any popover controls. This does not appear to be a problem on earlier versions of macOS and it only affects Mac Catalyst builds, not "Designed for iPad" builds.
STEPS TO REPRODUCE
Create a project that utilizes Mac Catalyst.
Create a simple button that shows a popover with simple content.
Remove Portrait as a supported orientation.
Run the project on macOS 15.2 as a Mac Catalyst build. Note that the content inside the popover is not shown the popover is shown.
Run the project as Designed for iPad. Note that the popover content shows correctly.
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.
Hi everyone,
I’m trying to reproduce the layout Apple Music uses for playlists, where there is header content above the table (artwork, title, buttons), and when you scroll, everything scrolls together—the header and table rows move as a single scrollable region.
Here’s an example of what I’m trying to achieve:
I’m using SwiftUI’s Table view and I haven’t found a clean way to place custom content above the table while keeping everything inside the same scroll view.
Is there currently a recommended way to achieve Apple Music–style scrollable header + table content using SwiftUI?
Thanks!
For information I stumbled upon a regression with SwiftUI Slider on iOS 26. Its onEditingChanged closure might be called twice when interaction ends, with a final Boolean incorrect value of true provided to the closure.
As a result apps cannot reliably rely on this closure to detect when an interaction with the slider starts or ends.
I filed a feedback under FB20283439 (iOS 26.0 regression: Slider onEditingChanged closure is unreliable).
Number keys on iPadOS 26 register incorrect/random characters, making numeric input unreliable across all applications.
Affected Versions
iPadOS 26.0 through 26.1 (build 23B85)
Platform-specific: Only iPadOS (iPhone doesn't present the full on-screen keyboard)
Reproduction Steps
Open any app with a numeric text field (For example, Apple's Contacts)
Tap numeric text field - a small number-only pad appears
Dismiss this small numpad (tap outside or hit return)
Tap the field again - full keyboard with numbers appears
Type numbers on this full keyboard
Result: Numbers register as random/incorrect characters
Scope
Affects numeric keyboard types (.numberPad, .decimalPad )
Reproducible in Apple's native apps (Contacts or any apps that has numeric TextField)
Impact
Critical: Users cannot reliably enter phone numbers, passwords, financial data, or any numeric input.
Other findings
Keyboard starts to register correct keys when switch from the full on-screen keyboard to alphabetic page, and then back to the page with numeric keys
I'm building an alarm app using the new AlarmKit introduced in iOS 26. The alarm works correctly when the device is locked, but when the screen is already on and unlocked, it only gives a single short vibration. I tested another app that also uses AlarmKit just to confirm, and it behaves the same way—only one short vibration if the display is awake, and the developer added a push notification as a workaround. The default iOS Clock app works properly in both situations (though when the screen is on, it uses the Dynamic Island interface). So I'm wondering: is this behavior a bug in AlarmKit, or is it intentional?
Topic:
UI Frameworks
SubTopic:
General
I am using a common UI pattern: UITabBarController as window root, each tab with a separate UINavigationController stack. I want the (bottom!) tab bar to be only visible when the user is at the root of the app and hide it when a detail page is opened.
To do that, I used hidesBottomBarWhenPushed on any view controller that would be pushed on my navigation stacks and that worked fine in the past.
But with iOS 26, I am seeing several issues:
On iOS where when the bottom tab bar is used, when in a details page and navigating back, the tab bar becomes fully visible immediately instead of slowly animating in as it has been in the past. This is particular visible and annoying when using the "swipe to go back" gesture
On iPad, the situation is even worse:
On iPadOS 18, the tab bar appeared in the navigation controller's navigation bar - no matter if hidesBottomBarWhenPushed was set or not - fine. But now, with iPadOS 26, this top tab bar disappears when a child is pushed.
Not only that, it disappears abruptly, without animation, and the Liquid Glass effect on the UIBarButtonItems is broken as well. There is no transition whatsoever, buttons are simply replaced with the new UIBarButtonItems of the pushed view controller once it became fully visible.
It gets even worse when swipe-back navigating on iPadOS: As soon as the back transition starts, the tab bar becomes visible again (without animation), covering the title (view) of the UINavigationController. If the swipe-back transition is not completed the tab bar suddenly stays visible
When the swipe-back transition is interrupted close to the end of the transition and it goes back to the pushed view controller, the top UIBarButtonItems are showing a visual glitch where the content (text or icon) stays on the area where the tab bar is, while their container (the glass effect) are on the vertically aligned to the title view.
I am surprised that I have not found any similar reports of these problems, so I am wondering if I am doing anything wrong or using hidesBottomBarWhenPushed simply isn't recommended or supported any more.
When utilizing Paperkit in its simplest form, PaperMarkupViewController does not show the option to add images.
Furthermore, trying to add images directly to the PaperMarkup's insertNewImage() function does not display anything. It seems like image functionality is entirely broken on Xcode 26.
This can be seen through the following example done by a fellow member here on the forums:
https://gist.github.com/clarkezone/68eb3ee13b5607782ceb2e20cece4ab3
I’m running Xcode 26.1.1 (17B100) with deployment target iOS 18.0+, and I’m seeing a consistent and reproducible issue on real devices (iPhone 13 Pro, iPhone 15 Pro):
Problem
The first time the user taps into a TextField or a SwiftUI .searchable field after app launch, the app freezes for 30–45 seconds before the keyboard appears.
During the freeze, the device console floods with:
XPC connection interrupted
Reporter disconnected. { function=sendMessage, reporterID=XXXXXXXXXXXX }
-[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:]
perform input operation requires a valid sessionID.
inputModality = Keyboard
customInfoType = UIEmojiSearchOperations
After the keyboard finally appears once, the issue never happens again until the app is force-quit.
This occurs on device
Reproduction Steps
Minimal reproducible setup:
Create a new SwiftUI app.
Add a single TextField or .searchable modifier.
Install Firebase (Firestore or Analytics is enough).
Build and run on device.
Tap the text field immediately after the home screen appears.
Result:
App freezes for 30–45 seconds before keyboard appears, with continuous XPC/RTIInputSystem errors in the logs.
If Firebase is removed, the issue occurs less often, but still happens occasionally.
Even If Firebase initialization is delayed by ~0.5 seconds, the issue is still there.
Question
Is this a known issue with iOS 18 / RTIInputSystem / Xcode 26.1.1, and is there a recommended workaround?
Delaying Firebase initialization avoids the freeze, but this isn’t ideal for production apps with startup authentication requirements.
Any guidance or confirmation would be appreciated.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Since iOS 18.3, icons are no longer generated correctly with QLThumbnailGenerator.
No error is returned either.
But this error message now appears in the console:
Error returned from iconservicesagent image request: <ISTypeIcon: 0x3010f91a0>,Type: com.adobe.pdf - <ISImageDescriptor: 0x302f188c0> - (36.00, 36.00)@3x v:1 l:5 a:0:0:0:0 t:() b:0 s:2 ps:0 digest: B19540FD-0449-3E89-AC50-38F92F9760FE error: Error Domain=NSOSStatusErrorDomain Code=-609 "Client is disallowed from making such an icon request" UserInfo={NSLocalizedDescription=Client is disallowed from making such an icon request}
Does anyone know this error? Is there a workaround?
Are there new permissions to consider?
Here is the code how icons are generated:
let request = QLThumbnailGenerator.Request(fileAt: url, size: size, scale: scale, representationTypes: self.thumbnailType)
request.iconMode = true
let generator = QLThumbnailGenerator.shared
generator.generateRepresentations(for: request) { [weak self] thumbnail, _, error in
}
Appkit starting logging these warnings in macOS 26.1 about my app's MainMenu.
**Internal inconsistency in menus - menu <NSMenu: 0xb91b2ff80>
Title: AppName
Supermenu: 0xb91a50b40 (Main Menu), autoenable: YES
Previous menu: 0x0 (None)
Next menu: 0x0 (None)
Items: ()
believes it has [<NSMenuSubclassHereThisIsTheMenuBarMenuForMyApp:] 0xb91a50b40>
Title: Main Menu
Supermenu: 0x0 (None), autoenable: YES
Previous menu: 0x0 (None)
Next menu: 0x0 (None)
Items: (
) as a supermenu, but the supermenu does not seem to have any item with that submenu
**
I don't what that means. The supermenu is the menu that represents the menu used for my app's menu bar (as described by NSMenuSubclassHereThisIsTheMenuBarMenuForMyApp
Everything seems to work fine but log looks scary. Please don't throw!
Bonjour,
I have an (old) app. written in Objective-C which works fine under iPadOS 26 with custom menus and contextual menus but without scenedelegate.
To be able to have multi-windows, I added scenedelegate but "buildMenuWithBuilder" is no more called.
I asked AI Claude and tried many solutions but none worked.
Has anyone else had and solved this problem?
Thanks.
Topic:
UI Frameworks
SubTopic:
General
In macOS 13.2, the NSTrackingEnabledDuringMouseDrag flag for NSTrackingArea is broken, i.e., mouse-entered and mouse-exited events are not sent during a drag. This problem did not exist in macOS 12. I've filed a bug report, FB11973492, just wondering if anyone knows a workaround.