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.

All subtopics
Posts under UI Frameworks topic

Post

Replies

Boosts

Views

Created

The State of Mac Catalyst in 2026
I’m exploring macOS development, comparing Mac Catalyst apps vs native AppKit/SwiftUI apps. What are the main limitations of Catalyst today? In what scenarios is a native AppKit or SwiftUI app unavoidable? Any insights are much appreciated — I’m trying to understand when Catalyst is sufficient and when going native is worth the extra effort.
3
0
327
Jan ’26
Right-clicking at the top edge of the menu bar doesn't trigger a statusitem action event any more in Tahoe
I have a program that installs an NSStatusItem button in the Menubar. It registers for both the right and left click events. Before Tahoe, clicking into the statusitem with the mouse at the very top of the menubar would also invoke the Action handler, be it a right or a left click. Now, with Tahoe, where the menubar height was changed from 24 to 30, left clicks at the top edge still trigger the Action event, but right clicks do not - they only work if moving the mouse a few pixels down. This is quite inconvenient - the idea of the menubar being at the edge of the screen was always that one can just push the mouse to the edge and then click to interact. Tahoe has broken this basic GUI concept now partially. And since left clicks still work, it suggests that I don't do anything wrong - the clicks are controlled by the framework, and I'm never asked to provide a frame in which the clicks shall be accepted. It's that Apple's code apparently now uses the smaller statusitem's bounds instead of the full menu bar height for hit-testing. Is that on purpose or a bug? And does someone know a work-around, i.e. can I hook into the click-handler at a deeper level and do the hit testing myself? I've tried adding a subview to the statusitem's window's contentView, but that also only reacts to clicks in the smaller area.
Topic: UI Frameworks SubTopic: AppKit
0
0
68
Jan ’26
Sheet keeps dismissing as soon as text focus
Anytime I launch a view that contains a textfield, as soon as it’s in focus the view dismisses, and I log this warning, I have tried everything I could think of and still no solution, anyone know a workaround to this? note: this happens both on simulator and physical devices -[rtiinputsystemclient remotetextinputsessionwithid:performinputoperation:] perform input operation requires a valid sessionid. input modality = keyboard, input operation = , custom infotype = uiemojisearchoperations
1
0
100
Jan ’26
Swift UI View is to small
Hello Apple Developer Forum Community, I’ve got a problem with the display of my SwiftUI View, that is tested on my physical iPhone. It’s shown very small (Picture) and on the Xcode Canvas Simulator it get’s shown right. What is the problem with my code?
4
0
211
Jan ’26
init(data: Data) for SwiftUI Image?
Is there any reason why the SwiftUI Image hasn’t a direct init(data: Data) like UIImage from UIKit? In my opinion it’s very unintuitive and expensive to create a UIImage in the first step to create a SwiftUI Image with Image(uiImage: UIImage) in the second step. In addition to that, this causes unnecessary UIKit imports. In my opinion this is a very obvious small in the API, so are there any reasons why it is what it is? Best regards
0
0
179
Jan ’26
How to work with the "Tiếng Việt Telex" keyboard?
I have an iOS application that derives on UITextInput to enter text. I have also overridden pressesBegan() and pressesEnded() in order to have some extra keyboard management (auto-repeat, special actions for arrow keys, function keys...) That works well for single-character languages (most roman languages, such as English, French, etc). For multi-character languages (Chinese, Japanses, Korean, Hindi), I can detect that the keyboard has been set to that language, and switch back to the default version of pressesBegan(): if let keyboardLanguage = self.textInputMode?.primaryLanguage { if (keyboardLanguage.hasPrefix("hi") || keyboardLanguage.hasPrefix("zh") || keyboardLanguage.hasPrefix("ja") || keyboardLanguage.hasPrefix("ko")) { super.pressesBegan(presses, with: event) } } But that strategy fails with the Tiếng Việt Telex keyboard (for Vietnamese language input). The way that keyboard works (as you can see if you open a document in Pages) is that you type as you go: T-i-e-n-g V-i-e-t T-e-l-e-x and the system adds the relevant diacritics once you've finished a word, so typing "Tieng Viet Telex" gives you "Tiếng Việt Telex" on the screen. Is there any documentation on the inner workings of this specific keyboard? What should I do (or not do) in order to make my application compatible with Tiếng Việt Telex?
1
0
442
Jan ’26
CallKit automatically shows a system top toast after iOS 26, how to dismiss it?
I’m developing an iOS app that integrates with CallKit. Starting from iOS 26, I’ve noticed that the system automatically presents a top banner / toast-style UI when a CallKit call becomes active (see attached screenshot). This UI appears to be fully managed by the system. On iOS versions prior to iOS 26, this UI did not appear under the same CallKit configuration. What I’ve observed The banner is displayed automatically by the system It appears at the top of the screen, similar to a toast or call status banner It is not a view created by my app I could not find any public API or CallKit configuration related to dismissing or controlling it My questions: Is this top banner an intended system behavior change in newer iOS versions? Is there any public API to dismiss, hide, or customize this UI? If not, is this UI considered non-dismissible by design? Any clarification on the expected behavior or recommended approach would be greatly appreciated.
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
242
Dec ’25
Too many bugs porting to iOS 26
Has anyone noticed that there are way too many bugs caused by the liquid glass issues? I'm noticing apple adding private layer classes between existing UI views to add glassy effect and no way to disable them. Some of these bugs have no way around without rewriting the code from. For example, search controller doesn't work anymore on iOS 26 but does work on iOS 18. The tab bar controller doesn't show at all on iOS 26 but does on iOS 18. I'm wondering if other people are facing the same issues.
Topic: UI Frameworks SubTopic: General
0
0
356
Dec ’25
iOS 26 + UINavigationBar crash in layoutSubViews - new observation tracking
My #1 crash report since iOS 26 is the following: 1 libobjc.A.dylib objc_exception_throw 2 Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] 3 UIKitCore -[UINavigationBar layoutSubviews] 4 UIKitCore UIView._layoutSubviewsWithObservationTracking() 5 UIKitCore @objc UIView._layoutSubviewsWithObservationTracking() Thread 0 9 libobjc.A.dylib objc_exception_throw 10 Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] 11 UIKitCore -[UINavigationBar layoutSubviews] 12 UIKitCore UIView._layoutSubviewsWithObservationTracking() 13 UIKitCore @objc UIView._layoutSubviewsWithObservationTracking() I tried many things, without success so far. It seemed related to the new view update with observation tracking: link to documentation Any lead on how I should investigate this? Many thanks in advance!!
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
369
Dec ’25
Setting `navigationItem.standardAppearance` overrides backButtonImage setting
Hello everybody. I need your help with configuring navigationItem properly. I want to use its appearance properties to configure how the navigation bar looks on per-screen basis without interacting with UINavigationBar directly (the API has been implemented for this specific use case, right?) What I'm confused about is that setting any appearance property resets back button image to the default chevron. What I do now: Inside my app delegate let navigationBarAppearance = UINavigationBar.appearance() navigationBarAppearance.backIndicatorImage = UIImage() navigationBarAppearance.backIndicatorTransitionMaskImage = UIImage() I do this to hide the default chevron to customize back button appearance on per-view-controller basis Then in my presenting view controller: override func viewDidLoad() { super.viewDidLoad() navigationItem.title = "Root" navigationItem.backBarButtonItem = UIBarButtonItem( title: nil, image: nil, primaryAction: UIAction( title: "", image: UIImage(systemName: "square.and.arrow.up"), identifier: nil, discoverabilityTitle: nil, attributes: [], state: .on, handler: { [weak self] _ in self?.navigationController?.popViewController(animated: true) } ), menu: nil ) let appearance = UINavigationBarAppearance() appearance.configureWithTransparentBackground() appearance.backgroundColor = UIColor.red appearance.titleTextAttributes = [ .foregroundColor: UIColor.purple ] appearance.largeTitleTextAttributes = [ .foregroundColor: UIColor.purple ] navigationItem.standardAppearance = appearance navigationItem.compactAppearance = appearance navigationItem.scrollEdgeAppearance = appearance navigationItem.compactScrollEdgeAppearance = appearance } The colors are set up as expected, however the default chevron image appears on the next view controller next to square.and.arrow.up. If I don't touch navigation item appearance properties - only square.and.arrow.up is displayed, as I want, but obviously I loose all the customization. Can anyone please explain how to set things up properly? Thanks!
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
184
Dec ’25
AppIntents default value
Hi, I have created an AppIntent in which there is a parameter called price, I have set the default value as 0. @Parameter(title: "Price", default: 0) var price: Int Problem When the shortcut is run this parameter is skipped Aim I still want to price to be asked however it needs to be pre-filled with 0 Question What should I do that the shortcut can still ask the price but be pre-filled with 0?
0
0
71
Dec ’25
AppIntents
Overview I have a custom type Statistics that has 3 properties inside it I am trying to return this as part of the AppIntent's perforrm method struct Statistics { var countA: Int var countB: Int var countC: Int } I would like to implement the AppIntent to return Statistics as follows: func perform() async throws -> some IntentResult & ReturnsValue<Statistics> { ... ... } Problem It doesn't make much sense to make Statistics as an AppEntity as this is only computed as a result. Statistics doesn't exist as a persisted entity in the app. Questions How can I implement Statistics? Does it have to be AppEntity (I am trying to avoid this)? (defaultQuery would never be used.) What is the correct way tackle this?
2
0
227
Dec ’25
Why does NSEvent.addGlobalMonitorForEvents still work in a Sandboxed macOS app
I am building a macOS utility using SwiftUI and Swift that records and displays keyboard shortcuts (like Cmd+C, Cmd+V) in the UI. To achieve this, I am using NSEvent.addGlobalMonitorForEvents(matching: [.keyDown]). I am aware that global monitoring usually requires the app to be non-sandboxed. However, I am seeing some behavior I don't quite understand during development: I started with a fresh SwiftUI project and disabled the App Sandbox. I requested Accessibility permissions using AXIsProcessTrustedWithOptions, manually enabled it in System Settings, and the global monitor worked perfectly. I then re-enabled the App Sandbox in "Signing & Capabilities." To my surprise, the app still records global events from other applications, even though the Sandbox is now active. Is this expected behavior? Does macOS "remember" the trust because the Bundle ID was previously authorized while non-sandboxed, or is there a specific reason a Sandboxed app can still use addGlobalMonitor if the user has manually granted Accessibility access? My app's core feature is displaying these shortcuts for the user's own reference (productivity tracking). If the user is the one explicitly granting permission via the Accessibility privacy pane, will Apple still reject the app for using global event monitors within a Sandboxed environment? Code snippet of my monitor: // This is still firing even after re-enabling Sandbox eventMonitor = NSEvent.addGlobalMonitorForEvents(matching: [.keyDown]) { event in print("Captured: \(event.charactersIgnoringModifiers ?? "")") } I've tried cleaning the build folder and restarting the app, removing the app from accessibility permission, but the events keep coming through. I want to make sure I'm not relying on a "development glitch" before I commit to the App Store path. Here is the full code anyone can use to try this :- import SwiftUI import Cocoa import Combine struct ShortcutEvent: Identifiable { let id = UUID() let displayString: String let timestamp: Date } class KeyboardManager: ObservableObject { @Published var isCapturing = false @Published var capturedShortcuts: [ShortcutEvent] = [] private var eventMonitor: Any? // 1. Check & Request Permissions func checkAccessibilityPermissions() -> Bool { let options: NSDictionary = [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true] let accessEnabled = AXIsProcessTrustedWithOptions(options) return accessEnabled } // 2. Start Capture func startCapture() { guard checkAccessibilityPermissions() else { print("Permission denied") return } isCapturing = true let mask: NSEvent.EventTypeMask = [.keyDown, .keyUp] eventMonitor = NSEvent.addGlobalMonitorForEvents(matching: mask) { [weak self] event in self?.processEvent(event) } } // 3. Stop Capture func stopCapture() { if let monitor = eventMonitor { NSEvent.removeMonitor(monitor) eventMonitor = nil } isCapturing = false } private func processEvent(_ event: NSEvent) { // Only log keyDown to avoid double-counting the UI display guard event.type == .keyDown else { return } var modifiers: [String] = [] var symbols: [String] = [] // Map symbols for the UI if event.modifierFlags.contains(.command) { modifiers.append("command") symbols.append("⌘") } if event.modifierFlags.contains(.shift) { modifiers.append("shift") symbols.append("⇧") } if event.modifierFlags.contains(.option) { modifiers.append("option") symbols.append("⌥") } if event.modifierFlags.contains(.control) { modifiers.append("control") symbols.append("⌃") } let key = event.charactersIgnoringModifiers?.uppercased() ?? "" // Only display if a modifier is active (to capture "shortcuts" vs regular typing) if !symbols.isEmpty && !key.isEmpty { let shortcutString = "\(symbols.joined(separator: " ")) + \(key)" DispatchQueue.main.async { // Insert at the top so the newest shortcut is visible self.capturedShortcuts.insert(ShortcutEvent(displayString: shortcutString, timestamp: Date()), at: 0) } } } } PS :- I just did another test by creating a fresh new project with the default App Sandbox enabled, and tried and there also it worked!! Can I consider this a go to for MacOs app store than?
1
0
515
Dec ’25
SwiftUI ScrollView blocked when content contains a drag gesture
I am porting my app to SwiftUI and I am hitting a wall when using ScrollView. In my application, I have nested scrollViews to represent a scheduler. outer vertical scroll view inner horizontal scroll view that allows to horizontally scroll multiple columns in the scheduler each column in the inner scroll view is a view that needs to allow for a drag to initiate the creation of a new appointment on macOS, I do a mouse-down drag, so it does not affect the scroll view and works fine on iOS, if I add a drag gesture to the column, it short circuits the scroll view and scrolling becomes disabled. To initiate the drag, there is a long-press, and that gesture is fine, only the subsequent drag gesture is problematic. I have attached URL to a test app. The UI allows you to toggle the drag gesture. Hopefully, someone can help to get it to work since I would eventually like to port the macOS target to Catalyst. Download Test App
Topic: UI Frameworks SubTopic: SwiftUI
2
0
159
Dec ’25
SwiftUI List cell reuse / view lifecycle behavior when scrolling
I’m trying to understand how SwiftUI List handles row lifecycle and reuse during scrolling. I have a list with around 60 card views; on initial load, only about 7 rows are created, but after scrolling to the bottom all rows appear to be created, and when scrolling back to the top I again observe multiple updates and apparent re-creation of rows. I confirmed this behavior using Instruments by profiling my app. Even though each row has a stable identifier, the row views still seem to be destroyed and recreated, which doesn’t resemble UIKit’s cell reuse model. I’d like clarity on how List uses identifiers internally, what actually gets reused versus recreated, and how developers should reason about performance and view lifetime in this case.
0
1
167
Dec ’25
MacCatalyst and the User's Documents Folder
I have a SwiftUI-based universal app which creates a file that it stores in documentsDirectory. On iOS/iPadOS, this file is stored in the application's Documents directory and is accessible via the Files app. On MacCatalyst, this operation does the same thing — it creates the file and stores it in ~/Library/Containers/<app directory>/Data/Documents. However what I want is for the document to be stored in ~/Documents, so that it is easily accessible to the user. How can I do that? I'd like it to occur without (for example) having to show a SaveFile panel...
4
0
478
Dec ’25
App delegate's openURLs: handler not taking .app (application) types any more
So, I was going to make a macOS application that accepts dropped apps. This used to work fine in older macOS versions such as High Sierra. It also works for apps like Script Editor. But I cannot get my own app, made with either Xcode or Script Editor, receive dropped apps any more. Mind you, Finder does accept dropping .app items onto my app, so the CFBundleDocumentTypes are fine. And, as I said, it works in High Sierra. The problem is that some part in AppKit or Core Services filters out apps from the list of dropped URLs before application:openURLs: is invoked. What's up with that, and how do I make this work again? I've tried copying all of Script Editor's Info.plist entries to no avail, so there's something more sinister going on here. Also filed under FB21456137
Topic: UI Frameworks SubTopic: AppKit
1
0
79
Dec ’25
listRowBackground vs swipeActions ios26 compatibility
Hi! On iOS 26, Apple’s Mail app shows an effect where a list row gets rounded corners while you’re swiping (so the row visually “matches” the rounded swipe buttons). In my app I’m using SwiftUI List + .swipeActions. I also need a custom row tint (e.g. subtle red/gray highlight based on state). The problem is: If I apply my tint using .background / .clipShape, it moves with the row content during swipe and looks wrong. If I use .listRowBackground(...), I keep the tint, but I don’t get the same rounded-corners “morphing” effect as in Mail (or it looks inconsistent). Question: What’s the correct way in iOS 26 to keep a custom row tint and get the system-style rounded corners / liquid-glass effect while swiping?
Topic: UI Frameworks SubTopic: SwiftUI
0
1
89
Dec ’25