Construct and manage graphical, event-driven user interfaces for iOS or tvOS apps using UIKit.

UIKit Documentation

Posts under UIKit subtopic

Post

Replies

Boosts

Views

Activity

UISheetPresentationController Disable Liquid Glass For Foreground Elements Within a Sheet
Hello just wondering if there is a supported way to disable the liquid glass effect that is passed down to every subview within a sheet using the medium or smaller detents? There are certain views with information in them within this sheet that I do not want to become semi transparent but I want to keep the background view of the sheet using the default liquid glass effect.
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
87
2d
The largeTitle of UINavigationBar disappears after scrolling on iOS 26.1
My project uses the UINavigationController's largeTitle on the latest iOS 26.1, but I found that when I set the backgroundColor, the navigation bar's largeTitle disappeared after switching between normal and large titles. I checked the latest documentation and consulted AI, but I have not found any good solutions. For the demo project, please refer to FB20986869
3
0
366
2d
Incorrect system color on popover view, and does not update while switching dark mode on iOS 26 beta 3
All system colors are displayed incorrectly on the popover view. Those are the same views present as a popover in light and dark mode. And those are the same views present as modal. And there is also a problem that when the popover is presented, switching to dark/light mode will not change the appearance. That affected all system apps. The following screenshot is already in dark mode. All those problem are occured on iOS 26 beta 3.
8
0
979
2d
iPadOS 26: How to prevent new scene creation when sharing a file to my app?
Many different types of files can be opened in my app. If a user, for example, views a file in the Files app and chooses to share the file, they can select my app from the list of options. My app is then given a chance to handle the file as needed. This works just fine in most cases. However, on iPadOS 26, if the user has set the iPad's Multitasking to either Windowed Apps or Stage Manager, then any time they choose to share a file with my app, a new scene (and window) is created. The user is usually not even aware that more and more windows/scenes are being created. It's only after they long-press on the app icon and select Show All Windows (or look under the Open Windows section) do they see far more windows than expected. Under iPadOS 17, 18, or with 26 set to Full Screen Apps, sharing a file to my app simply uses an existing scene, even if the user has explicitly created multiple scenes. A new scene is never created when sharing a file to my app unless there is no existing scene. Due to the nature of my app, even if the user has setup the iPad with Windowed App or Stage Manager under iPadOS 26, it would be far better if a new scene was not created and an existing scene was used. In other words, have it behave just as it does under iPadOS 17 or 18, or with 26 set as Full Screen Apps. Is there any way to configure an app to always use an existing scene when a file is shared with the app? My app is written with UIKit. Under iPadOS 26 with multitasking set to Windowed Apps or Stage Manager, sharing a file with my app results in the UIApplicationDelegate method application(_:configurationForConnecting:options:) being called. At this point a new scene is already in the process of being created. I don't see anything that can be set in the Info.plist. I do not see any relevant UIApplicationDelegate methods. Am I missing something or is this not possible?
0
0
68
2d
Is it a bug in UIActivityViewController to Airdrop ?
Context: Xcode 26.3, iOS 18.7.6 on iPhone Xs In this iOS app, I call UIActivityViewController to let user Airdrop files from the app. When trying to send a URL whose file name contains some characters like accentuated (-, é, '), the transfer fails. Removing those characters makes it work without problem. The same app running on Mac (in iPad mode) works with both cases. I also noticed that even when airdrop fails, there is no error reported by activityVC.completionWithItemsHandler = { activity, success, items, error in } Are those known issues ?
Topic: UI Frameworks SubTopic: UIKit Tags:
4
0
249
3d
Layout glitch after rotation when using UIWindowScene sizeRestrictions on iPadOS 26
Hi everyone, I am experiencing a strange rendering issue on iPadOS 26 when sizeRestrictions.minimumSize is set on a UIWindowScene. After rotating the device and then rotating it back to the original orientation, the window appears to be stretched based on its previous dimensions. This resulting "stretched" area does not resize or redraw correctly, leaving a significant black region on the screen. Interestingly, as soon as I interact with the window (e.g., a slight drag or touch), the UI snaps back to its intended state and redraws perfectly. Here is a sample code and capture of behavior. class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = (scene as? UIWindowScene) else { return } windowScene.sizeRestrictions?.minimumSize = CGSize( width: 390, height: 844 // larger than the height of iPad in landscape ) // initialize... } } Has anyone else encountered this behavior? If so, are there any known workarounds to force a layout refresh or prevent this "ghost" black area during the rotation transition? Any insights would be greatly appreciated. Thanks!
0
0
78
3d
UIDocumentPickerViewController allows to select file declared in Info.plist document types even when restricting to folder UTI
My document-based UIKit app can open plain text files such as .txt files. When tapping a particular button I want to be able to select a folder, but when using the code below, the document picker allows me to select folders as well as .txt files: class DocumentViewController: UIDocumentViewController, UIDocumentPickerDelegate { override func viewDidAppear(_ animated: Bool) { let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [.folder]) documentPicker.delegate = self present(documentPicker, animated: true) } } If I remove the text file entry from the Info.plist's document types list, it works as expected. Is this a bug and if yes, is there a workaround? <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>Text</string> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSHandlerRank</key> <string>Default</string> <key>LSItemContentTypes</key> <array> <string>public.text</string> </array> </dict> </array> I created FB22254960.
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
142
4d
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
4d
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
4d
Wrong appearance of decimalPad keyboard in dark mode
Hi. The following code causes UI mismatch on iOS26. Keyboard with type decimalPad and appearance as dark is displayed as popUp with wrong colors. Before iOS26 keyboard was regular with correct color scheme. Please advice either how to make the scheme correct or force to display regular keyboard instead of popup. class ViewController: UIViewController { @IBOutlet weak var textField: UITextField! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. textField.keyboardType = .decimalPad textField.keyboardAppearance = .dark view.backgroundColor = .darkGray } }
6
1
309
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
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
1w
Switching to custom keyboard size glitches
I've created a custom keyboard and implemented the: class KeyboardViewController: UIInputViewController The imlementation looks like this: override func viewDidLoad() { super.viewDidLoad() var stack = UIStackView() stack.axis = .vertical stack.spacing = 8 stack.translatesAutoresizingMaskIntoConstraints = false stack.distribution = .fill stack.heightAnchor.constraint(equalToConstant: 200).isActive = true .... view.addSubview(stack) NSLayoutConstraint.activate([ stack.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20), stack.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -20), stack.topAnchor.constraint(equalTo: view.topAnchor, constant: 10), stack.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -10) ]) The problem is that the keyboard seems to start showing in the size (I've printed the parent frame): Optional(<UIView: 0x101008480; frame = (0 0; 390 844); autoresize = W+H; layer = <CALayer: 0x600000207b80>>) and than resizes to my given height. But it's not fast enough so that I can see some glitches whenever I switch from another keyboard to my custom keyboard. Is there a way to prevent this resizing or start the keyboard in a given size? This is just not the best user experience.
Topic: UI Frameworks SubTopic: UIKit
2
2
211
1w
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
touchesEnded: not triggered on newer iOS when view is inside UIScrollView (was working on iOS 18)
Hi everyone, I’m facing an issue with touch handling on newer iOS versions. I have a custom view controller implemented in Objective-C that overrides touchesEnded:. The same code works correctly on iOS 18, but on newer iOS versions (tested on iOS 26), touchesEnded: is no longer being triggered. Important observations: touchesBegan: is triggered. touchesEnded: is NOT triggered. touchesCancelled: is also NOT triggered. No code changes were made between iOS 18 and iOS 26. Same code, same sample works fine in iOS18 device but not in iOS26 device Questions: Has gesture arbitration behavior changed in recent iOS 26 versions when views are inside UIScrollView? Any clarification on whether this is intended behavior or a regression would be greatly appreciated. Thank you.
Topic: UI Frameworks SubTopic: UIKit
6
0
303
2w
PHAssetCreationRequest merges new Burst Photos into "Recently Deleted" instead of Library
Description I am observing a critical issue when saving burst photos using the Photos Framework. If a burst photo with the same burstIdentifier already exists in the "Recently Deleted" album, any new assets saved via PHAssetCreationRequest are automatically merged into that deleted entry instead of appearing in the main Library or "All Photos." Environment Framework: Photos Framework (iOS) API: [[PHPhotoLibrary sharedPhotoLibrary] performChanges:...] Code Snippet The following logic is used to save the burst assets: [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ // 'paths' is a custom object providing the creation request PHAssetCreationRequest *assetCreationRqst = [paths assetCreationRqst]; assetCreationRqst.favorite = [FavorManager.shared isSetDownloadedAssetFavorite:self.curItem]; PHObjectPlaceholder *placeHolder = assetCreationRqst.placeholderForCreatedAsset; localIdentifier = placeHolder.localIdentifier; } completionHandler:^(BOOL success, NSError * _Nullable error) { if (success) { // The handler returns success, but the asset is invisible to the user [weakSelf handleDownloadSuccess:localIdentifier]; } // ... cleanup and completion ... }]; Steps to Reproduce Save a burst photo to the iPhone's built-in Photos app. Manually delete that burst photo so it moves to the "Recently Deleted" album. Execute the code above to save the same burst photo (or a new set containing the same burstIdentifier in its metadata). Check the main Photo Library / "All Photos" view. Observed Result The completionHandler returns success = YES, and a localIdentifier is generated. The photo does not appear in the main Library or "All Photos." The newly saved photo is silently merged into the existing burst set located inside the "Recently Deleted" folder. The user cannot see the new photo unless they manually "Restore" the deleted items from the album. Expected Behavior PHAssetCreationRequest should always result in a visible asset in the user's Library. Even if a matching burstIdentifier exists in "Recently Deleted," the system should treat the new request as a new independent asset or provide an error, rather than hiding it within a deleted collection.
5
0
367
2w
How to Reload Collection View (DiffableDataSource) after API Finishes Calling
Hello, I have a collection view that uses a diffable data source, and I am initiating an API call while configuring a cell RuntimeCell in the cell registration block inside setupDataSource(). The cell has a runtimeLabel property whose text I am setting inside a configureLabel(movieId:) function. I noticed that the collection view does not automatically refresh the text label once this API call finishes and after setting the text property on a UILabel in the collection view cell to a value retrieved during the API call. I presume this is because I need to call dataSource.apply(snapshot) myself to reload the changes in the collection view after the API call finishes retrieving the runtime data. However, since the API call happens via the configuration of the cell in the cell registration closure, this API call ends up being called infinitely if I call dataSource.apply(snapshot) every time the API call finishes (i.e. calling dataSource.applySnapshot() calls the closure for the cell registration handler which re-triggers the API call). What is the correct architecture to apply to accomplish reloading the collection view so that the text label appears once the API finishes calling? Thank you class MovieDetailViewController: UIViewController { func setupDataSource() { // ... let runTimeCellRegistration = UICollectionView.CellRegistration<RuntimeCell, Item> { cell, indexPath, item in cell.runtimeLabelDelegate = self cell.configureLabel(movieId: self.selectedMovie.id) } dataSource = UICollectionViewDiffableDataSource(collectionView: collectionView, cellProvider: { collectionView, indexPath, itemIdentifier in let section = Section(rawValue: indexPath.section) switch section { //... case .runtime: return collectionView.dequeueConfiguredReusableCell(using: runTimeCellRegistration, for: indexPath, item: itemIdentifier) //... } return nil }) } } protocol RuntimeLabelCellDelegate: AnyObject { func didUpdateRuntime() } class RuntimeCell: UICollectionViewCell { var runtimeLabel: UILabel! //... UI Setup func configureLabel(movieId: Int) { Task { do { let details = try await movieSearchService.fetchMovieDetails(movieId: movieId) await MainActor.run { let minutes = details.runTime let durationText = "\(minutes)m" var emojiText = "" if minutes < 90 { emojiText = "Short & Sweet ⚡️" } else if minutes > 150 { emojiText = "Get the snacks ready 🍿" } runtimeLabel.text = emojiText.isEmpty ? durationText : "\(durationText) • \(emojiText)" runtimeLabelDelegate?.didUpdateRuntime() } } catch { print("Failed to load details: \(error)") } } } } extension MovieDetailViewController: RuntimeLabelCellDelegate { func didUpdateRuntime() { var snapshot = dataSource.snapshot() snapshot.appendItems([.runtime], toSection: .runtime) dataSource.apply(snapshot, animatingDifferences: true) } }
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
83
2w
UISheetPresentationController Disable Liquid Glass For Foreground Elements Within a Sheet
Hello just wondering if there is a supported way to disable the liquid glass effect that is passed down to every subview within a sheet using the medium or smaller detents? There are certain views with information in them within this sheet that I do not want to become semi transparent but I want to keep the background view of the sheet using the default liquid glass effect.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
0
Boosts
0
Views
87
Activity
2d
The largeTitle of UINavigationBar disappears after scrolling on iOS 26.1
My project uses the UINavigationController's largeTitle on the latest iOS 26.1, but I found that when I set the backgroundColor, the navigation bar's largeTitle disappeared after switching between normal and large titles. I checked the latest documentation and consulted AI, but I have not found any good solutions. For the demo project, please refer to FB20986869
Replies
3
Boosts
0
Views
366
Activity
2d
Incorrect system color on popover view, and does not update while switching dark mode on iOS 26 beta 3
All system colors are displayed incorrectly on the popover view. Those are the same views present as a popover in light and dark mode. And those are the same views present as modal. And there is also a problem that when the popover is presented, switching to dark/light mode will not change the appearance. That affected all system apps. The following screenshot is already in dark mode. All those problem are occured on iOS 26 beta 3.
Replies
8
Boosts
0
Views
979
Activity
2d
iPadOS 26: How to prevent new scene creation when sharing a file to my app?
Many different types of files can be opened in my app. If a user, for example, views a file in the Files app and chooses to share the file, they can select my app from the list of options. My app is then given a chance to handle the file as needed. This works just fine in most cases. However, on iPadOS 26, if the user has set the iPad's Multitasking to either Windowed Apps or Stage Manager, then any time they choose to share a file with my app, a new scene (and window) is created. The user is usually not even aware that more and more windows/scenes are being created. It's only after they long-press on the app icon and select Show All Windows (or look under the Open Windows section) do they see far more windows than expected. Under iPadOS 17, 18, or with 26 set to Full Screen Apps, sharing a file to my app simply uses an existing scene, even if the user has explicitly created multiple scenes. A new scene is never created when sharing a file to my app unless there is no existing scene. Due to the nature of my app, even if the user has setup the iPad with Windowed App or Stage Manager under iPadOS 26, it would be far better if a new scene was not created and an existing scene was used. In other words, have it behave just as it does under iPadOS 17 or 18, or with 26 set as Full Screen Apps. Is there any way to configure an app to always use an existing scene when a file is shared with the app? My app is written with UIKit. Under iPadOS 26 with multitasking set to Windowed Apps or Stage Manager, sharing a file with my app results in the UIApplicationDelegate method application(_:configurationForConnecting:options:) being called. At this point a new scene is already in the process of being created. I don't see anything that can be set in the Info.plist. I do not see any relevant UIApplicationDelegate methods. Am I missing something or is this not possible?
Replies
0
Boosts
0
Views
68
Activity
2d
Is it a bug in UIActivityViewController to Airdrop ?
Context: Xcode 26.3, iOS 18.7.6 on iPhone Xs In this iOS app, I call UIActivityViewController to let user Airdrop files from the app. When trying to send a URL whose file name contains some characters like accentuated (-, é, '), the transfer fails. Removing those characters makes it work without problem. The same app running on Mac (in iPad mode) works with both cases. I also noticed that even when airdrop fails, there is no error reported by activityVC.completionWithItemsHandler = { activity, success, items, error in } Are those known issues ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
4
Boosts
0
Views
249
Activity
3d
Layout glitch after rotation when using UIWindowScene sizeRestrictions on iPadOS 26
Hi everyone, I am experiencing a strange rendering issue on iPadOS 26 when sizeRestrictions.minimumSize is set on a UIWindowScene. After rotating the device and then rotating it back to the original orientation, the window appears to be stretched based on its previous dimensions. This resulting "stretched" area does not resize or redraw correctly, leaving a significant black region on the screen. Interestingly, as soon as I interact with the window (e.g., a slight drag or touch), the UI snaps back to its intended state and redraws perfectly. Here is a sample code and capture of behavior. class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = (scene as? UIWindowScene) else { return } windowScene.sizeRestrictions?.minimumSize = CGSize( width: 390, height: 844 // larger than the height of iPad in landscape ) // initialize... } } Has anyone else encountered this behavior? If so, are there any known workarounds to force a layout refresh or prevent this "ghost" black area during the rotation transition? Any insights would be greatly appreciated. Thanks!
Replies
0
Boosts
0
Views
78
Activity
3d
UIDocumentPickerViewController allows to select file declared in Info.plist document types even when restricting to folder UTI
My document-based UIKit app can open plain text files such as .txt files. When tapping a particular button I want to be able to select a folder, but when using the code below, the document picker allows me to select folders as well as .txt files: class DocumentViewController: UIDocumentViewController, UIDocumentPickerDelegate { override func viewDidAppear(_ animated: Bool) { let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [.folder]) documentPicker.delegate = self present(documentPicker, animated: true) } } If I remove the text file entry from the Info.plist's document types list, it works as expected. Is this a bug and if yes, is there a workaround? <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>Text</string> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSHandlerRank</key> <string>Default</string> <key>LSItemContentTypes</key> <array> <string>public.text</string> </array> </dict> </array> I created FB22254960.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
2
Boosts
0
Views
142
Activity
4d
Is it safe to assume UIActivity is isolated to MainActor?
UIActivity is not annotated with concurrency information. Does anyone know if subclasses you create will always run on the @MainActor ?
Replies
1
Boosts
0
Views
83
Activity
4d
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
4d
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
4d
Partially disable liquid glass effect from navigation bars but retain on tabbar
I want to be able to disable all liquid glass effects from my Navigation bar, and it's bar buttons. But I still want to be able to have the liquid glass effect on my UITabbar. Is there a way to disable glass effects from navbar and still retain them all for tabbars using UIKit?
Replies
4
Boosts
2
Views
735
Activity
5d
Wrong appearance of decimalPad keyboard in dark mode
Hi. The following code causes UI mismatch on iOS26. Keyboard with type decimalPad and appearance as dark is displayed as popUp with wrong colors. Before iOS26 keyboard was regular with correct color scheme. Please advice either how to make the scheme correct or force to display regular keyboard instead of popup. class ViewController: UIViewController { @IBOutlet weak var textField: UITextField! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. textField.keyboardType = .decimalPad textField.keyboardAppearance = .dark view.backgroundColor = .darkGray } }
Replies
6
Boosts
1
Views
309
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
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
1w
Switching to custom keyboard size glitches
I've created a custom keyboard and implemented the: class KeyboardViewController: UIInputViewController The imlementation looks like this: override func viewDidLoad() { super.viewDidLoad() var stack = UIStackView() stack.axis = .vertical stack.spacing = 8 stack.translatesAutoresizingMaskIntoConstraints = false stack.distribution = .fill stack.heightAnchor.constraint(equalToConstant: 200).isActive = true .... view.addSubview(stack) NSLayoutConstraint.activate([ stack.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20), stack.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -20), stack.topAnchor.constraint(equalTo: view.topAnchor, constant: 10), stack.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -10) ]) The problem is that the keyboard seems to start showing in the size (I've printed the parent frame): Optional(<UIView: 0x101008480; frame = (0 0; 390 844); autoresize = W+H; layer = <CALayer: 0x600000207b80>>) and than resizes to my given height. But it's not fast enough so that I can see some glitches whenever I switch from another keyboard to my custom keyboard. Is there a way to prevent this resizing or start the keyboard in a given size? This is just not the best user experience.
Topic: UI Frameworks SubTopic: UIKit
Replies
2
Boosts
2
Views
211
Activity
1w
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
touchesEnded: not triggered on newer iOS when view is inside UIScrollView (was working on iOS 18)
Hi everyone, I’m facing an issue with touch handling on newer iOS versions. I have a custom view controller implemented in Objective-C that overrides touchesEnded:. The same code works correctly on iOS 18, but on newer iOS versions (tested on iOS 26), touchesEnded: is no longer being triggered. Important observations: touchesBegan: is triggered. touchesEnded: is NOT triggered. touchesCancelled: is also NOT triggered. No code changes were made between iOS 18 and iOS 26. Same code, same sample works fine in iOS18 device but not in iOS26 device Questions: Has gesture arbitration behavior changed in recent iOS 26 versions when views are inside UIScrollView? Any clarification on whether this is intended behavior or a regression would be greatly appreciated. Thank you.
Topic: UI Frameworks SubTopic: UIKit
Replies
6
Boosts
0
Views
303
Activity
2w
NSMENUITEMTITLEABOUT, NSMENUITEMTITLE in menu bar when running iOS app on Mac
I have an iOS app that runs on Mac, in iPad mode. In the menubar, some subitems are improperly labelled, featuring NSMENUITEMTITLEABOUT or NSMENUITEMHIDE or NSMENUITEMTITLE instead. Looks like it cannot find the name of the app. I have tried to set display name to no avail. Or is it a localisation issue ? How to correct this ?
Replies
1
Boosts
0
Views
138
Activity
2w
PHAssetCreationRequest merges new Burst Photos into "Recently Deleted" instead of Library
Description I am observing a critical issue when saving burst photos using the Photos Framework. If a burst photo with the same burstIdentifier already exists in the "Recently Deleted" album, any new assets saved via PHAssetCreationRequest are automatically merged into that deleted entry instead of appearing in the main Library or "All Photos." Environment Framework: Photos Framework (iOS) API: [[PHPhotoLibrary sharedPhotoLibrary] performChanges:...] Code Snippet The following logic is used to save the burst assets: [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ // 'paths' is a custom object providing the creation request PHAssetCreationRequest *assetCreationRqst = [paths assetCreationRqst]; assetCreationRqst.favorite = [FavorManager.shared isSetDownloadedAssetFavorite:self.curItem]; PHObjectPlaceholder *placeHolder = assetCreationRqst.placeholderForCreatedAsset; localIdentifier = placeHolder.localIdentifier; } completionHandler:^(BOOL success, NSError * _Nullable error) { if (success) { // The handler returns success, but the asset is invisible to the user [weakSelf handleDownloadSuccess:localIdentifier]; } // ... cleanup and completion ... }]; Steps to Reproduce Save a burst photo to the iPhone's built-in Photos app. Manually delete that burst photo so it moves to the "Recently Deleted" album. Execute the code above to save the same burst photo (or a new set containing the same burstIdentifier in its metadata). Check the main Photo Library / "All Photos" view. Observed Result The completionHandler returns success = YES, and a localIdentifier is generated. The photo does not appear in the main Library or "All Photos." The newly saved photo is silently merged into the existing burst set located inside the "Recently Deleted" folder. The user cannot see the new photo unless they manually "Restore" the deleted items from the album. Expected Behavior PHAssetCreationRequest should always result in a visible asset in the user's Library. Even if a matching burstIdentifier exists in "Recently Deleted," the system should treat the new request as a new independent asset or provide an error, rather than hiding it within a deleted collection.
Replies
5
Boosts
0
Views
367
Activity
2w
How to Reload Collection View (DiffableDataSource) after API Finishes Calling
Hello, I have a collection view that uses a diffable data source, and I am initiating an API call while configuring a cell RuntimeCell in the cell registration block inside setupDataSource(). The cell has a runtimeLabel property whose text I am setting inside a configureLabel(movieId:) function. I noticed that the collection view does not automatically refresh the text label once this API call finishes and after setting the text property on a UILabel in the collection view cell to a value retrieved during the API call. I presume this is because I need to call dataSource.apply(snapshot) myself to reload the changes in the collection view after the API call finishes retrieving the runtime data. However, since the API call happens via the configuration of the cell in the cell registration closure, this API call ends up being called infinitely if I call dataSource.apply(snapshot) every time the API call finishes (i.e. calling dataSource.applySnapshot() calls the closure for the cell registration handler which re-triggers the API call). What is the correct architecture to apply to accomplish reloading the collection view so that the text label appears once the API finishes calling? Thank you class MovieDetailViewController: UIViewController { func setupDataSource() { // ... let runTimeCellRegistration = UICollectionView.CellRegistration<RuntimeCell, Item> { cell, indexPath, item in cell.runtimeLabelDelegate = self cell.configureLabel(movieId: self.selectedMovie.id) } dataSource = UICollectionViewDiffableDataSource(collectionView: collectionView, cellProvider: { collectionView, indexPath, itemIdentifier in let section = Section(rawValue: indexPath.section) switch section { //... case .runtime: return collectionView.dequeueConfiguredReusableCell(using: runTimeCellRegistration, for: indexPath, item: itemIdentifier) //... } return nil }) } } protocol RuntimeLabelCellDelegate: AnyObject { func didUpdateRuntime() } class RuntimeCell: UICollectionViewCell { var runtimeLabel: UILabel! //... UI Setup func configureLabel(movieId: Int) { Task { do { let details = try await movieSearchService.fetchMovieDetails(movieId: movieId) await MainActor.run { let minutes = details.runTime let durationText = "\(minutes)m" var emojiText = "" if minutes < 90 { emojiText = "Short & Sweet ⚡️" } else if minutes > 150 { emojiText = "Get the snacks ready 🍿" } runtimeLabel.text = emojiText.isEmpty ? durationText : "\(durationText) • \(emojiText)" runtimeLabelDelegate?.didUpdateRuntime() } } catch { print("Failed to load details: \(error)") } } } } extension MovieDetailViewController: RuntimeLabelCellDelegate { func didUpdateRuntime() { var snapshot = dataSource.snapshot() snapshot.appendItems([.runtime], toSection: .runtime) dataSource.apply(snapshot, animatingDifferences: true) } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
0
Boosts
0
Views
83
Activity
2w