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

Korean IME forces Smart Quotes, ignoring UITextInputTraits and OS Settings
There is a long-standing, structural issue with the iPadOS Korean IME when using a hardware keyboard. The IME forcibly intercepts the " (quote) keydown event and injects Unicode smart/curved quotes (“ or ”) directly into the text field. This hardcoded behavior ignores both: User Settings: The global "Smart Punctuation" toggle in [Settings > General > Keyboard] is completely ignored. Developer APIs: Setting UITextInputTraits.smartQuotesType = .no on a UITextView or UITextField has absolutely no effect when the Korean keyboard is active. Steps to Reproduce: Set smartQuotesType = .no on a standard UITextView. Connect a hardware keyboard. Switch input language to English -> Press the quote key. (Result: ASCII straight quote " - Correct behavior) Switch input language to Korean -> Press the quote key. (Result: Unicode curved quote “ - Incorrect behavior) Impact on Developers & Users: Because the OS IME forcefully injects the curved Unicode character before the app can process the raw key event, developers building code editors, markdown editors, or specific word processors (like Google Docs) cannot prevent this behavior. We cannot provide a standard text-editing experience for Korean users without forcing them to manually toggle their keyboard language to English just to type a straight quote. Expected Behavior: The Korean hardware keyboard IME must respect UITextInputTraits.smartQuotesType and the global OS toggle. Please provide a mechanism for developers and users to bypass this forced CJK typography rule.
1
0
56
1w
Korean IME forces Smart Quotes, ignoring UITextInputTraits and OS Settings
There is a long-standing, structural issue with the iPadOS Korean IME when using a hardware keyboard. The IME forcibly intercepts the " (quote) keydown event and injects Unicode smart/curved quotes (“ or ”) directly into the text field. This hardcoded behavior ignores both: User Settings: The global "Smart Punctuation" toggle in [Settings > General > Keyboard] is completely ignored. Developer APIs: Setting UITextInputTraits.smartQuotesType = .no on a UITextView or UITextField has absolutely no effect when the Korean keyboard is active. Steps to Reproduce: Set smartQuotesType = .no on a standard UITextView. Connect a hardware keyboard. Switch input language to English -> Press the quote key. (Result: ASCII straight quote " - Correct behavior) Switch input language to Korean -> Press the quote key. (Result: Unicode curved quote “ - Incorrect behavior) Impact on Developers & Users: Because the OS IME forcefully injects the curved Unicode character before the app can process the raw key event, developers building code editors, markdown editors, or specific word processors (like Google Docs) cannot prevent this behavior. We cannot provide a standard text-editing experience for Korean users without forcing them to manually toggle their keyboard language to English just to type a straight quote. Expected Behavior: The Korean hardware keyboard IME must respect UITextInputTraits.smartQuotesType and the global OS toggle. Please provide a mechanism for developers and users to bypass this forced CJK typography rule.
Topic: UI Frameworks SubTopic: UIKit
0
0
71
1w
CarPlay: CPListImageRowItem images and CPNowPlayingTemplate buttons occasionally not displaying (requires device reboot)
Device: iPhone 17 Pro Max iOS version: iOS 26.3 CarPlay type: Wired We are encountering two intermittent UI issues in CarPlay when running our music application. The problems occur occasionally and cannot be recovered without restarting the device. Issue 1: CPListImageRowItem image not displaying On the CarPlay home page, some images occasionally fail to appear. Implementation details: The list is updated using CPListTemplate.updateSections. Each item is a CPListImageRowItem. On iOS versions below 26, images are updated using updateImages. On iOS 26, images are provided through CPListImageRowItem.elements, where each element is a CPListImageRowItemRowElement. Observed behavior: Logs confirm that the data is correctly provided. However, in failing cases the CPListImageRowItemRowElement appears with both title and subtitle equal to nil. The image is not rendered in the UI even though the item exists. Issue 2: Now Playing bottom buttons occasionally missing On the Now Playing screen, the bottom control buttons sometimes fail to appear. Implementation details: Buttons are updated using CPNowPlayingTemplate.updateNowPlayingButtons. The buttons are instances of CPNowPlayingImageButton. Observed behavior: Occasionally the buttons are not displayed. Once this occurs, the UI does not recover. Restarting the phone immediately resolves the issue. Additional observations The issue appears to occur intermittently. Once triggered, it persists until the device is rebooted. Similar behavior has been observed in other music apps (for example, QQ Music). Questions Are there known CarPlay UI rendering issues related to CPListImageRowItem or CPNowPlayingTemplate in recent iOS versions? Is there any recommended workaround or lifecycle handling that might prevent these UI elements from failing to render? Any guidance would be greatly appreciated.
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
51
1w
Gesture & SimultaneousGesture interfere with ScrollView behaviour.
I have faced a problem while I was trying to implement a reorder drag & drop view. I found that when I add any kind of .gesture or .simultaneousGesture, a ScrollView's scrolling behavior wasn't working properly (does not scroll at all). ScrollView(.vertical, showsIndicators: false) { ForEach($items) { $item in EditorCard(stepDetails: item) .simultaneousGesture( customCombinedGesture(item) ) } } This ScrollView worked fine with .onLongPressGesture(), however, I wanted to use custom gestures sequences.
0
0
118
1w
Increase Contrast reduces List selection contrast in dark appearance in SwiftUI NavigationSplitView
[Submitted as FB22200608] With Increase Contrast turned on, the selected row highlight in a List behaves inconsistently between light and dark appearance on iPad. In light appearance the blue selection highlight correctly becomes darker, but in dark appearance it becomes lighter instead. The text contrast ratio drops from about 3:1 to about 1.5:1, well below accessibility guidelines. This reproduces both in the simulator and on a physical device. The sample uses a standard SwiftUI List inside NavigationSplitView with built-in selection styling. No custom colors or styling are applied. REPRO STEPS Create a new Multiplatform project. Replace ContentView with code below. Build and run on iPad. Select an item in the list. Turn on Dark appearance (Cmd-Shift-A in Simulator). Turn on Increase Contrast (Cmd-Control-Shift-A in Simulator). Observe the selected row highlight. ACTUAL In light appearance, the blue selection highlight becomes darker when Increase Contrast is on, improving contrast as expected. In dark appearance, the blue selection highlight becomes lighter when Increase Contrast is on, reducing contrast between the selection background and the white text. EXPECTED Increase Contrast should consistently increase contrast. In dark appearance, the selection highlight should become darker—or otherwise increase contrast with the foreground text—not lighter. SAMPLE CODE struct ContentView: View { @State private var selection: String? var body: some View { NavigationSplitView { Text("Sidebar") } content: { List(selection: $selection) { Text("Item One") .tag("One") Text("Item Two") .tag("Two") } } detail: { if let selection { Text(selection) } else { Text("Select an item") } } } } SCREEN RECORDING CONTACTS The Contacts app behaves correctly. When Increase Contrast is turned on, the selection blue becomes darker, improving contrast. PASSWORDS The Passwords app, however, exhibits the issue. With Increase Contrast turned on, the selection blue becomes lighter instead of darker, reducing contrast.
4
0
252
1w
ShareLink "Save Image" action dismisses presenting view after saving
When using ShareLink in SwiftUI to share an image, the “Save Image” action dismisses not only the share sheet but also the presenting SwiftUI view. The behavior differs depending on whether the photo library permission alert appears. Observed behavior: The first time the user taps Save Image, the system permission alert appears. After granting permission, the image saves successfully and the share sheet dismisses normally. On subsequent attempts, the image is saved successfully, but both the share sheet and the presenting view are dismissed unexpectedly. Expected behavior: After saving the image, only the share sheet should dismiss. The presenting SwiftUI view should remain visible. Steps to Reproduce Present a SwiftUI view using .sheet. Inside that view, add a ShareLink configured to export a PNG image using Transferable. Tap the ShareLink button. Choose Save Image. Grant permission the first time (if prompted). Repeat the action. Result: On subsequent saves, the share sheet dismisses and the presenting view is dismissed as well. Sample code ` internal import System import UniformTypeIdentifiers import SwiftUI struct RootView: View { @State private var isPresented: Bool = false var body: some View { ZStack { Color.white Button("Show parent view") { isPresented = true } } .sheet(isPresented: $isPresented) { ParentView() } } } struct ParentView: View { @State private var isPresented: Bool = false var body: some View { NavigationStack { ZStack { Color.red.opacity(0.5) } .toolbar { ToolbarItem() { let name = "\(UUID().uuidString)" let image = UIImage(named: "after")! return ShareLink( item: ShareableImage(image: image, fileName: name), preview: SharePreview( name, image: Image(uiImage: image) ) ) { Image(uiImage: UIImage(resource: .Icons.share24)) .resizable() .foregroundStyle(Color.black) .frame(width: 24, height: 24) } } } } } } struct ShareableImage: Transferable { let image: UIImage let fileName: String static var transferRepresentation: some TransferRepresentation { FileRepresentation(exportedContentType: .png) { item in let fileURL = FileManager.default.temporaryDirectory .appendingPathComponent(item.fileName) .appendingPathExtension("png") guard let data = item.image.pngData() else { throw NSError(domain: "ImageEncodingError", code: 0) } try data.write(to: fileURL) return SentTransferredFile(fileURL) } } } `
1
0
54
1w
ShareLink "save Image" action dismiss parent view
ShareLink works fine except for save image action which dismiss the presenting view first time system shows the premission alert so image get saved without any problem but for the next saves image get saved then share sheet dismiss and also presenting view dismiss as well here is a sample code ` internal import System import UniformTypeIdentifiers import SwiftUI struct RootView: View { @State private var isPresented: Bool = false var body: some View { ZStack { Color.white Button("Show parent view") { isPresented = true } } .sheet(isPresented: $isPresented) { ParentView() } } } struct ParentView: View { @State private var isPresented: Bool = false var body: some View { NavigationStack { ZStack { Color.red.opacity(0.5) } .toolbar { ToolbarItem() { let name = "\(UUID().uuidString)" let image = UIImage(named: "after")! return ShareLink( item: ShareableImage(image: image, fileName: name), preview: SharePreview( name, image: Image(uiImage: image) ) ) { Image(uiImage: UIImage(resource: .Icons.share24)) .resizable() .foregroundStyle(Color.black) .frame(width: 24, height: 24) } } } } } } struct ShareableImage: Transferable { let image: UIImage let fileName: String static var transferRepresentation: some TransferRepresentation { FileRepresentation(exportedContentType: .png) { item in let fileURL = FileManager.default.temporaryDirectory .appendingPathComponent(item.fileName) .appendingPathExtension("png") guard let data = item.image.pngData() else { throw NSError(domain: "ImageEncodingError", code: 0) } try data.write(to: fileURL) return SentTransferredFile(fileURL) } } } `
1
0
81
1w
Cross-domain issue in wkwebview
Subject: Cross-Domain Access Behaviour in WKWebView – Clarification Required Description: We are facing a cross-domain issue in our iOS application where WKWebView loads content from one domain and attempts to access resources/data from another domain. Current Setup: App Platform: iOS WebView: WKWebView iOS Version: 26 Primary Domain: *.franconnectqa.net Data/Analytics Domain: analytics.franconnectdev.net SSL: Valid certificates configured ATS: Enabled Issue: When WKWebView loads content from franconnectqa.net, it attempts to access resources or analytics from analytics.franconnectdev.net, resulting in cross-domain restrictions. We would like to understand: Does WKWebView support cross-domain resource access by default? Are there any configuration settings that allow controlled cross-domain access? Are there known limitations regarding cookies, local storage, or session sharing across domains? Does WKWebView enforce additional restrictions beyond standard browser CORS policies? Are there recommended best practices for handling cross-domain scenarios in WKWebView? Expected Behavior: We want to determine whether: Cross-domain access is supported under certain configurations, OR The recommended approach is to align all resources under the same domain. Kindly provide guidance on the supported architecture and any configuration recommendations.
0
0
46
1w
iOS 26+ UITabBar unselected item colors not updating with UITabBarAppearance
I'm using UITabBarAppearance to customize my TabBar in a SwiftUI app. The customization works perfectly on iOS 18 and earlier, but after updating to iOS 26, the unselected tab items no longer respect my color settings - they just appear black (they are on a white background).Here's my simplified setup: struct ContentView: View { var body: some View { TabView { Text("Home") .tabItem { Image(systemName: "house") Text("Home") } .tag(0) Text("Settings") .tabItem { Image(systemName: "gear") Text("Settings") } .tag(1) } .onAppear { setupTabBarAppearance() } } private func setupTabBarAppearance() { let appearance = UITabBarAppearance() appearance.configureWithOpaqueBackground() let itemAppearance = UITabBarItemAppearance() // These settings work for selected items itemAppearance.selected.iconColor = .systemBlue itemAppearance.selected.titleTextAttributes = [ .font: UIFont.systemFont(ofSize: 10), .foregroundColor: UIColor.systemBlue ] // These settings STOPPED working on iOS 26 for unselected items itemAppearance.normal.iconColor = .gray itemAppearance.normal.titleTextAttributes = [ .font: UIFont.systemFont(ofSize: 10), .foregroundColor: UIColor.gray ] appearance.stackedLayoutAppearance = itemAppearance appearance.inlineLayoutAppearance = itemAppearance appearance.compactInlineLayoutAppearance = itemAppearance UITabBar.appearance().standardAppearance = appearance UITabBar.appearance().scrollEdgeAppearance = appearance } }
1
0
106
1w
Is there a way in AppKit to apply the Liquid Glass soft edge effect to a view placed outside an NSScrollView?
I’m developing a text editor that provides a line number view. This view is placed next to the NSScrollView that contains the main text view, rather than inside the scroll view. The line number view updates its drawing in sync with the NSScrollView’s scrolling and text editing in the NSTextView, so it can display the correct line numbers. This approach worked fine through macOS 15, but on macOS 26 with Liquid Glass, the line numbers end up being drawn without the expected blur/soft edge effect under the window toolbar area. In AppKit, some view controllers provide APIs to switch edge effects between soft/hard, but I can’t find any API to control this for the window toolbar region. I considered simply not drawing the numbers outside the content area, but if possible I’d like to apply the Tahoe-style soft edge effect instead. Does anyone have ideas? Is this currently impossible, meaning the only option is to file a feedback/API request? Also, for various reasons, the traditional approach of implementing line numbers by subclassing NSRulerView is difficult for my app.
Topic: UI Frameworks SubTopic: AppKit
0
0
84
1w
NSProgress - way to publish progress to make the file url unselectable in Finder?
So I'm in the middle of an asynchronous file operation. I publish an NSProgress and it displays wonderfully in Finder. But it is a folder and while the operation is in progress the user should not be allowed to enter it, modify it, etc, while the work is being done. I want to do this to protect the user from doing something silly. But Finder does not prevent the selection with the published progress. And while it would be kind of dumb to do - the user can just go about adding/removing contents to the folder while it has progress. If I remember correctly publishing an NSProgress did use to prevent the file from being selectable in Finder until either the progress finished or my app is quit (or maybe not)? But now the user is free to select, edit, modify during progress which could cause problems if the user does something unexpectedly silly. Is there a way to mark the file 'unselectable' with the published progress? Thanks in advance.
7
0
564
1w
Crown Sequencer warning on Scroll
I have a Form (scrollable) that contains 2 inputs as a Picker and a Stepper where frequency is an enum and time an Int. struct ConfigurationView: View { @Bindable var configuration: ConfigurationModel var body: some View { NavigationStack { Form { Picker(.frequency, selection: $configuration.frequency) { /* ... */ } Stepper(value: $configuration.time, in: 1...8) { // Stepper Label } .focusable() Button(.save) { configuration.save() } .buttonStyle(.borderedProminent) .listRowBackground(Color.clear) } .navigationTitle(.configuration) } } } The main issue I'm facing is a delay in the UI (1-3 seconds) while interacting with the Digital Crown over the focused Stepper which prints a Crown Sequencer warning: Crown Sequencer was set up without a view property. This will inevitably lead to incorrect crown indicator states This mainly happens when the Picker, which is showed as a modal or Sheet, changes its value, so the Stepper no longer gets focusable again. Looking into the docs, lectures and WWDC videos I just found that we need to provide a some sort of a focus, that's why the Stepper control has a focusable() modifier. I don't know if there is an overlap between the scroll and the focus event on the control.
1
0
167
1w
How do you disable split view tracking separators in macOS 26 Tahoe?
In the attached screenshot, we have an NSSplitViewController with three split view items. The first two are viewController split view items, while the third is an inspector split view item. The NSWindow is configured for full screen content so that the inspector split view items is full height itself. However, when we enable full height content view, AppKit is automatically adding a tracking separator into the toolbar when we don't want one. (Neither of the two split views are sidebars.) This tracking separator is out of place, cannot be dragged itself, and is drawn under the center aligned segmented control. We've tried a multitude of permutations to configure the NSWindow, NSToolbar and NSSplitViewItem but to no avail. Surely we're just missing the magic combo but a lot of the properties appear to be no-ops in macOS 26. How do we use an NSSplitViewController, in a full screen content window, such that we get a full height inspector but we don't get tracking separators for the main split view divider?
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
74
1w
File Export from iOS - eventually import too
iOS 15 - iOS 26.x, SwiftUI, Xcode 26.1.1 (rewritten without links) I’m attempting to add the capability to export a file from CoreData. Since ShareLink requires iOS16+, I found an article showing how to create a UIKit wrapper for 'UIActivityViewController' This does work, but I end up with multiple files instead of one. How do I merge this into one file? Note: I don’t think I want to write to the app’s document directory – rather I’d like to allow the user to export to iCloud. Eventually, I’d like to share a list of dates with descriptions and if someone puts a sensitive date in there – I don’t want it to be left in a directory. I would include a warning that the file that they export needs to be handled with care if there are any sensitive dates. Some might consider birthdays as private information, right? I'd also like to be able to name the file - so far when the share sheet comes up, I select "Save to Files" and it uses a default name of text.txt My next step is to be able to import a CSV file (roundtrip) - could you point me to resources for how to do that?
Topic: UI Frameworks SubTopic: SwiftUI
6
0
298
1w
URLByResolvingAliasFileAtURL: Appears to Be Broken - resolves to the the wrong folder
So if I create an Alias of a folder in Finder and hand the alias to my app (I also moved the alias file to a new folder, but I did not move the original folder)...so then my app resolves the alias using: NSURL +URLByResolvingAliasFileAtURL: What happens? The resolved URL points to a completely different folder. Well not completely different. It resolves to a folder that happens to share same last path component as the original folder...but this folder is inside the same parent folder the alias file is in. It does not resolve to the original folder I created the alias of. So then once my app touches the alias with +URLByResolvingAliasFileAtURL: the alias now resolves to this new (wrong) location (even in Finder). Couple details: My app is not sandboxed. I have permission to access the original folder in my app (but even if I didn't the alias shouldn't be mutated just by merely resolving it). Only seems to happen if the folder I move the alias to happens to contain a sibling folder that has the same title as the original folder. Like it's just deleting the last path component of the alias and then appending the last path component of the original filename and just going with that. I hope that makes sense. I tried creating the alias myself using -bookmarkDataWithOptions: and going the other way (to Finder) but Finder must be resolving the alias using a different API because it resolves to the original location as expected.
2
0
157
2w
Putting 2 existing pdf pages side by side (half size) in a new pdf
In Swift, iOS, I have a pdf file. I want to take the pages 2 by 2 and put them side by side, on the new page. For this, I have to scale initial pages half size and rotate .pi/2. I managed to achieve this by converting pdf pages to UIImages and using a UIGraphicsImageRenderer. But with a critical loss of resolution. I've tried improving the resolution by creating images as jpegData(withCompressionQuality: 1.0), to no avail. So I would need to work directly on the pdf pages using CGPDFDocument format. The code structure is as follows, to insert a single scaled page: for iPage in … { if let _page = theCGPdfDocument.page(at: 1) { var _pageRect: CGRect = _page.getBoxRect(CGPDFBox.mediaBox) writeContextInDestination!.beginPage(mediaBox: &_pageRect) // translate to compensate for the flip caused displacement writeContextInDestination!.translateBy(x: _pageRect.size.width, y: _pageRect.size.height) Scale (-1, -1) // rotate 180° // add rotate as needed writeContextInDestination!.scaleBy(x: -1, y: -1) writeContextInDestination!.clip(to: _pageRect) writeContextInDestination!.drawPDFPage(_page) writeContextInDestination!.endPage() // end the current page } } writeContextInDestination!.closePDF() But I do not succeed in inserting the drawing of the second page. I've tried repeating lines 7 to 11 for a second page at line 13. No success. What is the direction to look for ?
1
0
194
2w
DataScannerViewController freezes when enabling torch using AVCaptureDevice
I am using DataScannerViewController from VisionKit to scan text in my iOS application. The scanner works correctly while running. However, I added a custom button to toggle the device torch (flashlight). To toggle the torch, I access the camera device using AVCaptureDevice and set torchMode after locking the configuration. When I turn on the torch while DataScannerViewController is actively scanning, the scanner UI freezes and the camera preview stops updating. The app becomes unresponsive until I leave the screen. This issue appears on all iOS versions. Code used to toggle the torch: guard let device = AVCaptureDevice.default(for: .video),       device.hasTorch else { return } do {     try device.lockForConfiguration()     device.torchMode = device.torchMode == .on ? .off : .on     device.unlockForConfiguration() } catch {     print(error) } Questions: Is it supported to control the torch directly via AVCaptureDevice while DataScannerViewController is running? Does DataScannerViewController internally lock or manage the camera configuration in a way that can cause this freeze? Is there a recommended way to enable/disable the torch when using DataScannerViewController? Environment: VisionKit DataScannerViewController iPhone device (not simulator) iOS versions where freeze occurs: All Any clarification about whether this behavior is expected or a limitation of VisionKit would be appreciated.
Topic: UI Frameworks SubTopic: General
0
1
67
2w
How to disable the iOS 26 navigation bar glass style
Hi dear, Our app have adapt for iOS26 ,but we don't need the navigation right and back view style. Design Team Style. Navigation item style is plain style Apple iOS 26 System Navigation Item style (back item with circle background and efffort) We don't want to redesign a new custom navigation view .We need to keep the UIDesignRequiresCompatibility to NO. Do we have any feature to disable the system style? Thank you all. ------------------------分隔符--------------------- 亲爱的,我们的应用已适配iOS26系统,但不需要iOS26导航自带的玻璃样式。 我们不想重新设计新的自定义导航视图。系统的UIDesignRequiresCompatibility配置我们需要设置为NO(其他地方的液态玻璃效果需要保留),我们是否有功能或者设置可以禁用系统样式?谢谢大家。
Topic: UI Frameworks SubTopic: General
0
0
70
2w
iOS 26: default gray background on UITabBarItem
In iOS 26, when a UITabBarItem is selected, a gray background appears behind the selected item. This seems to happen automatically with the new tab bar design. I tried configuring the tab bar using UITabBarAppearance, but the background highlight still appears. Is this the expected behavior in iOS 26 or is there a recommended way to configure the tab bar so that only the icon and title change color when selected?
Topic: UI Frameworks SubTopic: UIKit
4
0
254
2w
Korean IME forces Smart Quotes, ignoring UITextInputTraits and OS Settings
There is a long-standing, structural issue with the iPadOS Korean IME when using a hardware keyboard. The IME forcibly intercepts the " (quote) keydown event and injects Unicode smart/curved quotes (“ or ”) directly into the text field. This hardcoded behavior ignores both: User Settings: The global "Smart Punctuation" toggle in [Settings > General > Keyboard] is completely ignored. Developer APIs: Setting UITextInputTraits.smartQuotesType = .no on a UITextView or UITextField has absolutely no effect when the Korean keyboard is active. Steps to Reproduce: Set smartQuotesType = .no on a standard UITextView. Connect a hardware keyboard. Switch input language to English -> Press the quote key. (Result: ASCII straight quote " - Correct behavior) Switch input language to Korean -> Press the quote key. (Result: Unicode curved quote “ - Incorrect behavior) Impact on Developers & Users: Because the OS IME forcefully injects the curved Unicode character before the app can process the raw key event, developers building code editors, markdown editors, or specific word processors (like Google Docs) cannot prevent this behavior. We cannot provide a standard text-editing experience for Korean users without forcing them to manually toggle their keyboard language to English just to type a straight quote. Expected Behavior: The Korean hardware keyboard IME must respect UITextInputTraits.smartQuotesType and the global OS toggle. Please provide a mechanism for developers and users to bypass this forced CJK typography rule.
Replies
1
Boosts
0
Views
56
Activity
1w
Korean IME forces Smart Quotes, ignoring UITextInputTraits and OS Settings
There is a long-standing, structural issue with the iPadOS Korean IME when using a hardware keyboard. The IME forcibly intercepts the " (quote) keydown event and injects Unicode smart/curved quotes (“ or ”) directly into the text field. This hardcoded behavior ignores both: User Settings: The global "Smart Punctuation" toggle in [Settings > General > Keyboard] is completely ignored. Developer APIs: Setting UITextInputTraits.smartQuotesType = .no on a UITextView or UITextField has absolutely no effect when the Korean keyboard is active. Steps to Reproduce: Set smartQuotesType = .no on a standard UITextView. Connect a hardware keyboard. Switch input language to English -> Press the quote key. (Result: ASCII straight quote " - Correct behavior) Switch input language to Korean -> Press the quote key. (Result: Unicode curved quote “ - Incorrect behavior) Impact on Developers & Users: Because the OS IME forcefully injects the curved Unicode character before the app can process the raw key event, developers building code editors, markdown editors, or specific word processors (like Google Docs) cannot prevent this behavior. We cannot provide a standard text-editing experience for Korean users without forcing them to manually toggle their keyboard language to English just to type a straight quote. Expected Behavior: The Korean hardware keyboard IME must respect UITextInputTraits.smartQuotesType and the global OS toggle. Please provide a mechanism for developers and users to bypass this forced CJK typography rule.
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
71
Activity
1w
CarPlay: CPListImageRowItem images and CPNowPlayingTemplate buttons occasionally not displaying (requires device reboot)
Device: iPhone 17 Pro Max iOS version: iOS 26.3 CarPlay type: Wired We are encountering two intermittent UI issues in CarPlay when running our music application. The problems occur occasionally and cannot be recovered without restarting the device. Issue 1: CPListImageRowItem image not displaying On the CarPlay home page, some images occasionally fail to appear. Implementation details: The list is updated using CPListTemplate.updateSections. Each item is a CPListImageRowItem. On iOS versions below 26, images are updated using updateImages. On iOS 26, images are provided through CPListImageRowItem.elements, where each element is a CPListImageRowItemRowElement. Observed behavior: Logs confirm that the data is correctly provided. However, in failing cases the CPListImageRowItemRowElement appears with both title and subtitle equal to nil. The image is not rendered in the UI even though the item exists. Issue 2: Now Playing bottom buttons occasionally missing On the Now Playing screen, the bottom control buttons sometimes fail to appear. Implementation details: Buttons are updated using CPNowPlayingTemplate.updateNowPlayingButtons. The buttons are instances of CPNowPlayingImageButton. Observed behavior: Occasionally the buttons are not displayed. Once this occurs, the UI does not recover. Restarting the phone immediately resolves the issue. Additional observations The issue appears to occur intermittently. Once triggered, it persists until the device is rebooted. Similar behavior has been observed in other music apps (for example, QQ Music). Questions Are there known CarPlay UI rendering issues related to CPListImageRowItem or CPNowPlayingTemplate in recent iOS versions? Is there any recommended workaround or lifecycle handling that might prevent these UI elements from failing to render? Any guidance would be greatly appreciated.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
1
Boosts
0
Views
51
Activity
1w
Gesture & SimultaneousGesture interfere with ScrollView behaviour.
I have faced a problem while I was trying to implement a reorder drag & drop view. I found that when I add any kind of .gesture or .simultaneousGesture, a ScrollView's scrolling behavior wasn't working properly (does not scroll at all). ScrollView(.vertical, showsIndicators: false) { ForEach($items) { $item in EditorCard(stepDetails: item) .simultaneousGesture( customCombinedGesture(item) ) } } This ScrollView worked fine with .onLongPressGesture(), however, I wanted to use custom gestures sequences.
Replies
0
Boosts
0
Views
118
Activity
1w
Increase Contrast reduces List selection contrast in dark appearance in SwiftUI NavigationSplitView
[Submitted as FB22200608] With Increase Contrast turned on, the selected row highlight in a List behaves inconsistently between light and dark appearance on iPad. In light appearance the blue selection highlight correctly becomes darker, but in dark appearance it becomes lighter instead. The text contrast ratio drops from about 3:1 to about 1.5:1, well below accessibility guidelines. This reproduces both in the simulator and on a physical device. The sample uses a standard SwiftUI List inside NavigationSplitView with built-in selection styling. No custom colors or styling are applied. REPRO STEPS Create a new Multiplatform project. Replace ContentView with code below. Build and run on iPad. Select an item in the list. Turn on Dark appearance (Cmd-Shift-A in Simulator). Turn on Increase Contrast (Cmd-Control-Shift-A in Simulator). Observe the selected row highlight. ACTUAL In light appearance, the blue selection highlight becomes darker when Increase Contrast is on, improving contrast as expected. In dark appearance, the blue selection highlight becomes lighter when Increase Contrast is on, reducing contrast between the selection background and the white text. EXPECTED Increase Contrast should consistently increase contrast. In dark appearance, the selection highlight should become darker—or otherwise increase contrast with the foreground text—not lighter. SAMPLE CODE struct ContentView: View { @State private var selection: String? var body: some View { NavigationSplitView { Text("Sidebar") } content: { List(selection: $selection) { Text("Item One") .tag("One") Text("Item Two") .tag("Two") } } detail: { if let selection { Text(selection) } else { Text("Select an item") } } } } SCREEN RECORDING CONTACTS The Contacts app behaves correctly. When Increase Contrast is turned on, the selection blue becomes darker, improving contrast. PASSWORDS The Passwords app, however, exhibits the issue. With Increase Contrast turned on, the selection blue becomes lighter instead of darker, reducing contrast.
Replies
4
Boosts
0
Views
252
Activity
1w
ShareLink "Save Image" action dismisses presenting view after saving
When using ShareLink in SwiftUI to share an image, the “Save Image” action dismisses not only the share sheet but also the presenting SwiftUI view. The behavior differs depending on whether the photo library permission alert appears. Observed behavior: The first time the user taps Save Image, the system permission alert appears. After granting permission, the image saves successfully and the share sheet dismisses normally. On subsequent attempts, the image is saved successfully, but both the share sheet and the presenting view are dismissed unexpectedly. Expected behavior: After saving the image, only the share sheet should dismiss. The presenting SwiftUI view should remain visible. Steps to Reproduce Present a SwiftUI view using .sheet. Inside that view, add a ShareLink configured to export a PNG image using Transferable. Tap the ShareLink button. Choose Save Image. Grant permission the first time (if prompted). Repeat the action. Result: On subsequent saves, the share sheet dismisses and the presenting view is dismissed as well. Sample code ` internal import System import UniformTypeIdentifiers import SwiftUI struct RootView: View { @State private var isPresented: Bool = false var body: some View { ZStack { Color.white Button("Show parent view") { isPresented = true } } .sheet(isPresented: $isPresented) { ParentView() } } } struct ParentView: View { @State private var isPresented: Bool = false var body: some View { NavigationStack { ZStack { Color.red.opacity(0.5) } .toolbar { ToolbarItem() { let name = "\(UUID().uuidString)" let image = UIImage(named: "after")! return ShareLink( item: ShareableImage(image: image, fileName: name), preview: SharePreview( name, image: Image(uiImage: image) ) ) { Image(uiImage: UIImage(resource: .Icons.share24)) .resizable() .foregroundStyle(Color.black) .frame(width: 24, height: 24) } } } } } } struct ShareableImage: Transferable { let image: UIImage let fileName: String static var transferRepresentation: some TransferRepresentation { FileRepresentation(exportedContentType: .png) { item in let fileURL = FileManager.default.temporaryDirectory .appendingPathComponent(item.fileName) .appendingPathExtension("png") guard let data = item.image.pngData() else { throw NSError(domain: "ImageEncodingError", code: 0) } try data.write(to: fileURL) return SentTransferredFile(fileURL) } } } `
Replies
1
Boosts
0
Views
54
Activity
1w
ShareLink "save Image" action dismiss parent view
ShareLink works fine except for save image action which dismiss the presenting view first time system shows the premission alert so image get saved without any problem but for the next saves image get saved then share sheet dismiss and also presenting view dismiss as well here is a sample code ` internal import System import UniformTypeIdentifiers import SwiftUI struct RootView: View { @State private var isPresented: Bool = false var body: some View { ZStack { Color.white Button("Show parent view") { isPresented = true } } .sheet(isPresented: $isPresented) { ParentView() } } } struct ParentView: View { @State private var isPresented: Bool = false var body: some View { NavigationStack { ZStack { Color.red.opacity(0.5) } .toolbar { ToolbarItem() { let name = "\(UUID().uuidString)" let image = UIImage(named: "after")! return ShareLink( item: ShareableImage(image: image, fileName: name), preview: SharePreview( name, image: Image(uiImage: image) ) ) { Image(uiImage: UIImage(resource: .Icons.share24)) .resizable() .foregroundStyle(Color.black) .frame(width: 24, height: 24) } } } } } } struct ShareableImage: Transferable { let image: UIImage let fileName: String static var transferRepresentation: some TransferRepresentation { FileRepresentation(exportedContentType: .png) { item in let fileURL = FileManager.default.temporaryDirectory .appendingPathComponent(item.fileName) .appendingPathExtension("png") guard let data = item.image.pngData() else { throw NSError(domain: "ImageEncodingError", code: 0) } try data.write(to: fileURL) return SentTransferredFile(fileURL) } } } `
Replies
1
Boosts
0
Views
81
Activity
1w
Cross-domain issue in wkwebview
Subject: Cross-Domain Access Behaviour in WKWebView – Clarification Required Description: We are facing a cross-domain issue in our iOS application where WKWebView loads content from one domain and attempts to access resources/data from another domain. Current Setup: App Platform: iOS WebView: WKWebView iOS Version: 26 Primary Domain: *.franconnectqa.net Data/Analytics Domain: analytics.franconnectdev.net SSL: Valid certificates configured ATS: Enabled Issue: When WKWebView loads content from franconnectqa.net, it attempts to access resources or analytics from analytics.franconnectdev.net, resulting in cross-domain restrictions. We would like to understand: Does WKWebView support cross-domain resource access by default? Are there any configuration settings that allow controlled cross-domain access? Are there known limitations regarding cookies, local storage, or session sharing across domains? Does WKWebView enforce additional restrictions beyond standard browser CORS policies? Are there recommended best practices for handling cross-domain scenarios in WKWebView? Expected Behavior: We want to determine whether: Cross-domain access is supported under certain configurations, OR The recommended approach is to align all resources under the same domain. Kindly provide guidance on the supported architecture and any configuration recommendations.
Replies
0
Boosts
0
Views
46
Activity
1w
iOS 26+ UITabBar unselected item colors not updating with UITabBarAppearance
I'm using UITabBarAppearance to customize my TabBar in a SwiftUI app. The customization works perfectly on iOS 18 and earlier, but after updating to iOS 26, the unselected tab items no longer respect my color settings - they just appear black (they are on a white background).Here's my simplified setup: struct ContentView: View { var body: some View { TabView { Text("Home") .tabItem { Image(systemName: "house") Text("Home") } .tag(0) Text("Settings") .tabItem { Image(systemName: "gear") Text("Settings") } .tag(1) } .onAppear { setupTabBarAppearance() } } private func setupTabBarAppearance() { let appearance = UITabBarAppearance() appearance.configureWithOpaqueBackground() let itemAppearance = UITabBarItemAppearance() // These settings work for selected items itemAppearance.selected.iconColor = .systemBlue itemAppearance.selected.titleTextAttributes = [ .font: UIFont.systemFont(ofSize: 10), .foregroundColor: UIColor.systemBlue ] // These settings STOPPED working on iOS 26 for unselected items itemAppearance.normal.iconColor = .gray itemAppearance.normal.titleTextAttributes = [ .font: UIFont.systemFont(ofSize: 10), .foregroundColor: UIColor.gray ] appearance.stackedLayoutAppearance = itemAppearance appearance.inlineLayoutAppearance = itemAppearance appearance.compactInlineLayoutAppearance = itemAppearance UITabBar.appearance().standardAppearance = appearance UITabBar.appearance().scrollEdgeAppearance = appearance } }
Replies
1
Boosts
0
Views
106
Activity
1w
Is there a way in AppKit to apply the Liquid Glass soft edge effect to a view placed outside an NSScrollView?
I’m developing a text editor that provides a line number view. This view is placed next to the NSScrollView that contains the main text view, rather than inside the scroll view. The line number view updates its drawing in sync with the NSScrollView’s scrolling and text editing in the NSTextView, so it can display the correct line numbers. This approach worked fine through macOS 15, but on macOS 26 with Liquid Glass, the line numbers end up being drawn without the expected blur/soft edge effect under the window toolbar area. In AppKit, some view controllers provide APIs to switch edge effects between soft/hard, but I can’t find any API to control this for the window toolbar region. I considered simply not drawing the numbers outside the content area, but if possible I’d like to apply the Tahoe-style soft edge effect instead. Does anyone have ideas? Is this currently impossible, meaning the only option is to file a feedback/API request? Also, for various reasons, the traditional approach of implementing line numbers by subclassing NSRulerView is difficult for my app.
Topic: UI Frameworks SubTopic: AppKit
Replies
0
Boosts
0
Views
84
Activity
1w
NSProgress - way to publish progress to make the file url unselectable in Finder?
So I'm in the middle of an asynchronous file operation. I publish an NSProgress and it displays wonderfully in Finder. But it is a folder and while the operation is in progress the user should not be allowed to enter it, modify it, etc, while the work is being done. I want to do this to protect the user from doing something silly. But Finder does not prevent the selection with the published progress. And while it would be kind of dumb to do - the user can just go about adding/removing contents to the folder while it has progress. If I remember correctly publishing an NSProgress did use to prevent the file from being selectable in Finder until either the progress finished or my app is quit (or maybe not)? But now the user is free to select, edit, modify during progress which could cause problems if the user does something unexpectedly silly. Is there a way to mark the file 'unselectable' with the published progress? Thanks in advance.
Replies
7
Boosts
0
Views
564
Activity
1w
Crown Sequencer warning on Scroll
I have a Form (scrollable) that contains 2 inputs as a Picker and a Stepper where frequency is an enum and time an Int. struct ConfigurationView: View { @Bindable var configuration: ConfigurationModel var body: some View { NavigationStack { Form { Picker(.frequency, selection: $configuration.frequency) { /* ... */ } Stepper(value: $configuration.time, in: 1...8) { // Stepper Label } .focusable() Button(.save) { configuration.save() } .buttonStyle(.borderedProminent) .listRowBackground(Color.clear) } .navigationTitle(.configuration) } } } The main issue I'm facing is a delay in the UI (1-3 seconds) while interacting with the Digital Crown over the focused Stepper which prints a Crown Sequencer warning: Crown Sequencer was set up without a view property. This will inevitably lead to incorrect crown indicator states This mainly happens when the Picker, which is showed as a modal or Sheet, changes its value, so the Stepper no longer gets focusable again. Looking into the docs, lectures and WWDC videos I just found that we need to provide a some sort of a focus, that's why the Stepper control has a focusable() modifier. I don't know if there is an overlap between the scroll and the focus event on the control.
Replies
1
Boosts
0
Views
167
Activity
1w
How do you disable split view tracking separators in macOS 26 Tahoe?
In the attached screenshot, we have an NSSplitViewController with three split view items. The first two are viewController split view items, while the third is an inspector split view item. The NSWindow is configured for full screen content so that the inspector split view items is full height itself. However, when we enable full height content view, AppKit is automatically adding a tracking separator into the toolbar when we don't want one. (Neither of the two split views are sidebars.) This tracking separator is out of place, cannot be dragged itself, and is drawn under the center aligned segmented control. We've tried a multitude of permutations to configure the NSWindow, NSToolbar and NSSplitViewItem but to no avail. Surely we're just missing the magic combo but a lot of the properties appear to be no-ops in macOS 26. How do we use an NSSplitViewController, in a full screen content window, such that we get a full height inspector but we don't get tracking separators for the main split view divider?
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
1
Boosts
0
Views
74
Activity
1w
File Export from iOS - eventually import too
iOS 15 - iOS 26.x, SwiftUI, Xcode 26.1.1 (rewritten without links) I’m attempting to add the capability to export a file from CoreData. Since ShareLink requires iOS16+, I found an article showing how to create a UIKit wrapper for 'UIActivityViewController' This does work, but I end up with multiple files instead of one. How do I merge this into one file? Note: I don’t think I want to write to the app’s document directory – rather I’d like to allow the user to export to iCloud. Eventually, I’d like to share a list of dates with descriptions and if someone puts a sensitive date in there – I don’t want it to be left in a directory. I would include a warning that the file that they export needs to be handled with care if there are any sensitive dates. Some might consider birthdays as private information, right? I'd also like to be able to name the file - so far when the share sheet comes up, I select "Save to Files" and it uses a default name of text.txt My next step is to be able to import a CSV file (roundtrip) - could you point me to resources for how to do that?
Topic: UI Frameworks SubTopic: SwiftUI
Replies
6
Boosts
0
Views
298
Activity
1w
URLByResolvingAliasFileAtURL: Appears to Be Broken - resolves to the the wrong folder
So if I create an Alias of a folder in Finder and hand the alias to my app (I also moved the alias file to a new folder, but I did not move the original folder)...so then my app resolves the alias using: NSURL +URLByResolvingAliasFileAtURL: What happens? The resolved URL points to a completely different folder. Well not completely different. It resolves to a folder that happens to share same last path component as the original folder...but this folder is inside the same parent folder the alias file is in. It does not resolve to the original folder I created the alias of. So then once my app touches the alias with +URLByResolvingAliasFileAtURL: the alias now resolves to this new (wrong) location (even in Finder). Couple details: My app is not sandboxed. I have permission to access the original folder in my app (but even if I didn't the alias shouldn't be mutated just by merely resolving it). Only seems to happen if the folder I move the alias to happens to contain a sibling folder that has the same title as the original folder. Like it's just deleting the last path component of the alias and then appending the last path component of the original filename and just going with that. I hope that makes sense. I tried creating the alias myself using -bookmarkDataWithOptions: and going the other way (to Finder) but Finder must be resolving the alias using a different API because it resolves to the original location as expected.
Replies
2
Boosts
0
Views
157
Activity
2w
Putting 2 existing pdf pages side by side (half size) in a new pdf
In Swift, iOS, I have a pdf file. I want to take the pages 2 by 2 and put them side by side, on the new page. For this, I have to scale initial pages half size and rotate .pi/2. I managed to achieve this by converting pdf pages to UIImages and using a UIGraphicsImageRenderer. But with a critical loss of resolution. I've tried improving the resolution by creating images as jpegData(withCompressionQuality: 1.0), to no avail. So I would need to work directly on the pdf pages using CGPDFDocument format. The code structure is as follows, to insert a single scaled page: for iPage in … { if let _page = theCGPdfDocument.page(at: 1) { var _pageRect: CGRect = _page.getBoxRect(CGPDFBox.mediaBox) writeContextInDestination!.beginPage(mediaBox: &_pageRect) // translate to compensate for the flip caused displacement writeContextInDestination!.translateBy(x: _pageRect.size.width, y: _pageRect.size.height) Scale (-1, -1) // rotate 180° // add rotate as needed writeContextInDestination!.scaleBy(x: -1, y: -1) writeContextInDestination!.clip(to: _pageRect) writeContextInDestination!.drawPDFPage(_page) writeContextInDestination!.endPage() // end the current page } } writeContextInDestination!.closePDF() But I do not succeed in inserting the drawing of the second page. I've tried repeating lines 7 to 11 for a second page at line 13. No success. What is the direction to look for ?
Replies
1
Boosts
0
Views
194
Activity
2w
DataScannerViewController freezes when enabling torch using AVCaptureDevice
I am using DataScannerViewController from VisionKit to scan text in my iOS application. The scanner works correctly while running. However, I added a custom button to toggle the device torch (flashlight). To toggle the torch, I access the camera device using AVCaptureDevice and set torchMode after locking the configuration. When I turn on the torch while DataScannerViewController is actively scanning, the scanner UI freezes and the camera preview stops updating. The app becomes unresponsive until I leave the screen. This issue appears on all iOS versions. Code used to toggle the torch: guard let device = AVCaptureDevice.default(for: .video),       device.hasTorch else { return } do {     try device.lockForConfiguration()     device.torchMode = device.torchMode == .on ? .off : .on     device.unlockForConfiguration() } catch {     print(error) } Questions: Is it supported to control the torch directly via AVCaptureDevice while DataScannerViewController is running? Does DataScannerViewController internally lock or manage the camera configuration in a way that can cause this freeze? Is there a recommended way to enable/disable the torch when using DataScannerViewController? Environment: VisionKit DataScannerViewController iPhone device (not simulator) iOS versions where freeze occurs: All Any clarification about whether this behavior is expected or a limitation of VisionKit would be appreciated.
Topic: UI Frameworks SubTopic: General
Replies
0
Boosts
1
Views
67
Activity
2w
safeAreaBar size, for list offset
In my tabview i set a safeAreaBar topPanel, under i have contentview. That ignore safeArea.top so feed go under. What is the best Way to have a the first post in content appear under (under the bottom) if the safeareabar. I use list with foreach. Do we measure the height or is it some smart tips?
Replies
0
Boosts
0
Views
101
Activity
2w
How to disable the iOS 26 navigation bar glass style
Hi dear, Our app have adapt for iOS26 ,but we don't need the navigation right and back view style. Design Team Style. Navigation item style is plain style Apple iOS 26 System Navigation Item style (back item with circle background and efffort) We don't want to redesign a new custom navigation view .We need to keep the UIDesignRequiresCompatibility to NO. Do we have any feature to disable the system style? Thank you all. ------------------------分隔符--------------------- 亲爱的,我们的应用已适配iOS26系统,但不需要iOS26导航自带的玻璃样式。 我们不想重新设计新的自定义导航视图。系统的UIDesignRequiresCompatibility配置我们需要设置为NO(其他地方的液态玻璃效果需要保留),我们是否有功能或者设置可以禁用系统样式?谢谢大家。
Topic: UI Frameworks SubTopic: General
Replies
0
Boosts
0
Views
70
Activity
2w
iOS 26: default gray background on UITabBarItem
In iOS 26, when a UITabBarItem is selected, a gray background appears behind the selected item. This seems to happen automatically with the new tab bar design. I tried configuring the tab bar using UITabBarAppearance, but the background highlight still appears. Is this the expected behavior in iOS 26 or is there a recommended way to configure the tab bar so that only the icon and title change color when selected?
Topic: UI Frameworks SubTopic: UIKit
Replies
4
Boosts
0
Views
254
Activity
2w