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

Posts under UIKit tag

200 Posts

Post

Replies

Boosts

Views

Activity

iOS 26: FloatingBarContainerView overlapping the whole custom ViewController
Hi everyone: I'm experiencing an issue in iOS 26. I've implemented a custom ViewController. It's super simple to edit images with flip, crop, zoom in, and zoom out. My question is that it seems very strange to me. It works without problems in iOS 17.5 and iOS 18. However, when I try to run it with iOS 26, the entire ViewController seems disabled; it doesn't recognize touches or anything. When I checked the UI hierarchy, I saw a strange FloatingBarContainerView overlaying the entire ViewController. I searched the documentation for information about this view, but I couldn't find anything. Any help on how to hide or remove this view in iOS 26? This hasn't been implemented anywhere.
0
0
7
13m
Does Mac Catalyst support an "always on top" window scene?
My UIKit/Mac Catalyst app supports a user opening multiple windows (multiple scenes). One of these is a special scene that shows content that I want to appear in front of all other app windows/scenes, even while the user is interacting with one of the app's other scenes. I do not need this special scene to stay in front of the windows of other apps, just in front of the windows of my own app. While I'm not 100% sure, it seems that AppKit supports this through the NSWindow level property. I can't find any equivalent feature in UIKit/Mac Catalyst. UIWindow windowLevel is not the same thing since that only affects the order of windows within a given scene. I need an entire scene (and its windows) to stay in front of my app's other scenes (and their windows). I don't see anything relevant in UIWindow, UIScene, UIWindowScene, UISceneSession, UIScene.ActivationRequestOptions, or UIWindowScene.ActivationRequestOptions.
2
0
23
15m
iOS26: Back button changes appearance when modal screen is shown
I use appearance api to set a custom background image for my navigation bar. At the start color of the back button icon is black. But for some reason color becomes white when new screen is presented modally. My whole project is relied on the appearance api so I cannot remove or replace it. Looks like a bug. The setup code is simple: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. setupappearance() return true } func setupappearance() { let navImage = UIImage(named: "new_navigation_background1") let appearance = UINavigationBarAppearance() appearance.configureWithOpaqueBackground() appearance.backgroundImage = navImage UINavigationBar.appearance().scrollEdgeAppearance = appearance UINavigationBar.appearance().standardAppearance = appearance UINavigationBar.appearance().compactAppearance = appearance UINavigationBar.appearance().compactScrollEdgeAppearance = appearance }
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
30
25m
Xcode build running into issues
I have been trying to run the ios build and facing issues since last few days. I installed xcode with ios26 and switched to xcode 16.2 beta and now in xcode16.1. My development is blocked as am hitting errors one after the other. Can you point me to any configuration which works ? My development is blocked and its real pain.
1
0
95
6h
[iOS 26] UIVideoEditorController preview's top bar is overlapping with parent view controller
Applicaiton is built with WebKit and native camera view controller . Issue is seen always when presenting a UIVideoEditorController class on top of MainVC(webKit). Please refer the attached image Code: self.videoEditor.modalPresentationStyle = UIModalPresentationFullScreen; [viewController presentViewController:self.videoEditor animated: YES completion:nil];
4
0
173
14h
App Crashes in UICollectionView.m:3974
No Trace of My App is found in Crash Report. The last trace is from UIKitCore. -> Foundation [NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 288 (NSException.m:252) -> UIKitCore [UICollectionView _createPreparedSupplementaryViewForElementOfKind:atIndexPath:layout:withLayoutAttributes:applyAttributes:] + 1180 (UICollectionView.m:3974) What can be the possible causes for this type of crash?
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
94
3d
iPadOS 26 - TableView auto scrolling bug
We are observing that for devices with iPadOS 26, table views within apps are unexpectedly auto scrolling. The issue can be reproduced as follows: The table view has enough cells to the point where not all cells can fit on the screen and the table view is scrollable User has scrolled to the bottom of the tableView and tableView.reloadData() is called. One of the following applies: The ViewController containing the tableView is embedded in a UINavigationController, and ViewController sets self.edgesForExtendedLayout = .bottom The ViewController containing the tableView is embedded in a UINavigationController, and UINavigationController sets navigationBar.isTranslucent = false The following constraints are applied to the tableView: tableView.topAnchor.constraint(equalTo: view.layoutMarginsGuide.topAnchor).isActive = true tableView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true tableView.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true After thorough testing, we've found that the bug is only present in iPads with iPadOS 26. It does not show for iPhone devices or for iPads on iPadOS 18. We are hoping that this can be fixed as it is causing poor user experience. Full code needed to reproduce the issue: Use this willConnectTo function in SceneDelegate: func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = scene as? UIWindowScene else { return } window = UIWindow(windowScene: windowScene) let navigationControllerWithVC = UINavigationController(rootViewController: ViewController()) // ⚠️ CASE 1 - Comment out the .isTranslucent setter below, or set the value to true, and the scrolling issue will be gone, granted that the other issue-causing lines in ViewController.swift // are also commented. navigationControllerWithVC.navigationBar.isTranslucent = false window?.rootViewController = navigationControllerWithVC // Replace this line with window?.rootViewController = ViewController() to get rid of UINavigationController window?.makeKeyAndVisible() } Use this ViewController class that is referenced from the SceneDelegate willConnectTo function: import UIKit class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { var tableView: UITableView! var safeArea: UILayoutGuide! var timer: Timer! override func viewDidLoad() { super.viewDidLoad() // ⚠️ CASE 2 - Uncomment the line below when this view is inside a UINavigationController to cause the scrolling issue. //self.edgesForExtendedLayout = .bottom tableView = UITableView() safeArea = view.layoutMarginsGuide setupTableView() timer = Timer.scheduledTimer(timeInterval: 3.0, target: self, selector: #selector(fireTimer), userInfo: nil, repeats: true) } @objc public func fireTimer() { tableView.reloadData() print("Reloaded table") } func setupTableView() { tableView.delegate = self tableView.dataSource = self view.addSubview(tableView) tableView.translatesAutoresizingMaskIntoConstraints = false // ⚠️ CASE 3 - Replace view.topAnchor in the next line below with safeArea.topAnchor to see the scrolling issue, regardless if view is inside a UINavigationController. tableView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true tableView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true tableView.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 40 } public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 50.0 } public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = UITableViewCell() cell.textLabel?.text = indexPath.row == 39 ? "END" : "Row \(indexPath.row)" return cell } public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) } } For reproducing this on iPadOS 26 simulators, I can confirm that simulators under Xcode 26.0.1 (17A400) and Xcode 26.1 Beta (17B5025f) will show the issue. The issue is present in iPadOS 26 and iPadOS 26.1 beta. I've also submitted Apple Feedback for this (FB20357980) with all this code in a Xcode project.
4
0
252
3d
[iOS 26] Can no longer detect whether iPhone has notch
I'm currently using the extension below to determine whether an iPhone has a notch so I can adjust my UI accordingly. extension UIDevice { var hasNotch: Bool { if userInterfaceIdiom == .phone, let window = (UIApplication.shared.connectedScenes .compactMap { $0 as? UIWindowScene } .flatMap { $0.windows } .first { $0.isKeyWindow }) { return window.safeAreaInsets.bottom > 0 } return false } } (Adapted from https://stackoverflow.com/questions/73946911/how-to-detect-users-device-has-dynamic-island-in-uikit) This no longer works in iOS 26, and I have yet to find a similar method that works. Does anyone have any fixes?
4
0
109
4d
App Terminated with 0x8BADF00D: Main Thread Blocked During Back-to-Back Messaging
Hello, I'm experiencing an issue with my app where it's being terminated by the system with a watchdog violation during back-to-back messaging operations. I've analyzed the crash logs but would appreciate additional insights on optimizing my approach. I'd appreciate any insights on how to resolve this problem. Crash Details: Exception Type: EXC_CRASH (SIGKILL) Termination Reason: FRONTBOARD with code 0x8BADF00D Error: "scene-update watchdog transgression: app exhausted real time allowance of 10.00 seconds" Reproduction Steps: User A initiates back-to-back messages to other User User A's UI becomes unresponsive and eventually the app crashes. Stack Trace Analysis: The crash occurs on the main thread, which appears to be blocked waiting for a condition in the keyboard handling system. The thread is stuck in [UIKeyboardTaskQueue _lockWhenReadyForMainThread] and related methods, suggesting an issue with keyboard-related operations during the messaging process. Crash Tag Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: FRONTBOARD 2343432205 <RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: app<com.msikodiak.eptt(AD934F8A-DF57-4B75-BE73-8CF1A9A8F856)>:301 exhausted real (wall clock) time allowance of 10.00 seconds ProcessVisibility: Foreground ProcessState: Running WatchdogEvent: scene-update WatchdogVisibility: Background WatchdogCPUStatistics: ( "Elapsed total CPU time (seconds): 6.390 (user 3.640, system 2.750), 11% CPU", "Elapsed application CPU time (seconds): 0.020, 0% CPU" ) ThermalInfo: ( "Thermal Level: 0", "Thermal State: nominal" ) reportType:CrashLog maxTerminationResistance:Interactive> Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libsystem_kernel.dylib 0x1e773d438 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x2210bc328 _pthread_cond_wait + 1028 2 Foundation 0x1957d8a64 -[NSCondition waitUntilDate:] + 132 3 Foundation 0x1957d8888 -[NSConditionLock lockWhenCondition:beforeDate:] + 80 4 UIKitCore 0x1998f1238 -[UIKeyboardTaskQueue _lockWhenReadyForMainThread] + 456 5 UIKitCore 0x19a3d775c __59-[UIKeyboardImpl updateAutocorrectPrompt:executionContext:]_block_invoke_9 + 28 6 UIKitCore 0x19986b084 -[UIKeyboardTaskQueue lockWhenReadyForMainThread] + 168 7 UIKitCore 0x19a3f2994 -[UIKeyboardTaskQueue waitUntilTaskIsFinished:] + 148 8 UIKitCore 0x19a3f2ac4 -[UIKeyboardTaskQueue performSingleTask:breadcrumb:] + 132 9 UIKitCore 0x199e2f7e4 -[_UIKeyboardStateManager updateForChangedSelection] + 144 10 UIKitCore 0x199e24200 -[_UIKeyboardStateManager invalidateTextEntryContextForTextInput:] + 92 11 WebKit 0x1ad52fa54 WebKit::PageClientImpl::didProgrammaticallyClearFocusedElement(WebCore::ElementContext&&) + 40 12 WebKit 0x1ad55adcc WebKit::WebPageProxy::didProgrammaticallyClearFocusedElement(WebCore::ElementContext&&) + 136 13 WebKit 0x1acec74e8 WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 18604 14 WebKit 0x1acd21184 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 236 15 WebKit 0x1ace449b8 WebKit::WebProcessProxy::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 40 16 WebKit 0x1ace44228 WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 1764 17 WebKit 0x1acd1e904 IPC::Connection::dispatchMessage(WTF::UniqueRef<IPC::Decoder>) + 268 18 WebKit 0x1acd1e478 IPC::Connection::dispatchIncomingMessages() + 576 19 JavaScriptCore 0x1ae386b8c WTF::RunLoop::performWork() + 524 20 JavaScriptCore 0x1ae386960 WTF::RunLoop::performWork(void*) + 36 21 CoreFoundation 0x196badce4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 22 CoreFoundation 0x196badc78 __CFRunLoopDoSource0 + 172 23 CoreFoundation 0x196bac9fc __CFRunLoopDoSources0 + 232 24 CoreFoundation 0x196babc3c __CFRunLoopRun + 840 25 CoreFoundation 0x196bd0700 CFRunLoopRunSpecific + 572 26 GraphicsServices 0x1e3711190 GSEventRunModal + 168 27 UIKitCore 0x1997ee240 -[UIApplication _run] + 816 28 UIKitCore 0x1997ec470 UIApplicationMain + 336 29 Telstra PTT 0x1004d30c8 main + 56 30 dyld 0x1bd5d3ad8 start + 5964
4
1
202
4d
Recover iPadOS MenuBar state from different scenes
I’m building a Flutter plugin to access the new menubar API on iPadOS. Everything works fine with a single scene, but I’m running into issues when adding support for multiple scenes: Only odd-numbered windows (first, third, etc.) build their menus correctly. Even-numbered windows ignore the menus sent from Flutter and fall back to a default menubar. When switching between scenes, the last rendered menu always persists instead of updating to the current focus. So far, I’ve: Implemented the plugin as a singleton. Tried to persist menu state per scene, but without success. What would be the recommended approach here? Should I avoid a singleton and manage state entirely per UIScene instance? The project is open-source, and if anyone is willing to take a look, here are the relevant files: /ios/Classes/IpadOSMenubarPlugin.swift /example/ios/Runner/AppDelegate.swift Any guidance would be much appreciated.
1
0
76
4d
XIB Files line seperator = none not be respected in iOS 26.1 ONLY
Hey All, Curious if you guys are seeing the same thing for those who are using Interface Builder Files (Xib) i set the line seperator to none and on my app (built against ios 18 on the app store, but doesnt matter if i build it against ios 26, or ios 26.1) when running on iOS 26.1 the line seperator will show even when i set it to None. Funny enough if i just play around with the XIB file and set it to single line and maybe RED color the IB file will show it but when running it its the same old default dark greyish color. BUT if i set the line seperator in CODE either to be none or with single line + red it looks good when running on sim / device. So it seems to be an issue with XIB files not being respected in iOS 26.1 (only) i have submitted a feed back FB20466783, hope this helps any xcode devs / uikit devs. thank you !
1
0
72
5d
How to turn off background extension effect in UISplitViewController?
I have a triple-column UISplitViewController setup in "tile" mode. Each of the 3 columns has a table view controller. Under iPadOS 26, the section headers and row selection in the middle table extends all the way to the left of the screen, behind the primary column. It looks terrible. The documentation for "Adopting Liquid Glass" makes it sound like you can add this behavior by using UIBackgroundExtensionView. But I get this behavior automatically in a UISplitViewController. How do I turn this off? I created a simpler sample using a double-column split view with two table view controllers. Here's a screenshot of the result: Note how the section headers and the row selection appear all the way to the left edge of the screen. I don't want that effect. How do you turn off this effect in a UISplitViewController? Here is the code used to setup the split view and the app's main window: func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let winScene = (scene as? UIWindowScene) else { return } let primary = PrimaryViewController(style: .plain) let primaryNC = UINavigationController(rootViewController: primary) let detail = DetailViewController(style: .plain) let detailNC = UINavigationController(rootViewController: detail) let sv = UISplitViewController(style: .doubleColumn) sv.preferredDisplayMode = .oneBesideSecondary sv.preferredSplitBehavior = .tile sv.primaryBackgroundStyle = .none sv.displayModeButtonVisibility = .automatic sv.setViewController(primaryNC, for: .primary) sv.setViewController(detailNC, for: .secondary) let win = UIWindow(windowScene: winScene) win.rootViewController = sv win.makeKeyAndVisible() window = win } The PrimaryViewController and DetailViewController are simple UITableViewController subclasses that only add a few rows and section headers as needed.
4
1
132
5d
Click on UITextView or UITextField to crash
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x115fadbc0' *** First throw call stack: (0x1940bd8c8 0x1910097c4 0x194159838 0x19403a4f8 0x1940423a0 0x1e42cb9a8 0x1e42ce220 0x106f02c08 0x1080a461c 0x1080be2b0 0x1080acb2c 0x1080ad7b4 0x1080b9b00 0x1080b91a4 0x1eecdb3b8 0x1eecda8c0) libc++abi: terminating due to uncaught exception of type NSException InputAnalytics called timeIntervalSinceReferenceDate in dispatch_sync.The display issue of the call stack occurs in two stages: keyboard input analysis and folding the keyboard.After adding protection to NSString, it can function normally, but I want to know the reason. #import "NSString+Safe.h" @implementation NSString (Safe) - (NSTimeInterval)timeIntervalSinceReferenceDate { return 0; } - (NSTimeInterval)timeIntervalSinceDate:(NSDate *)date { return 0; } @end
3
0
70
5d
preferredImageDynamicRange is not marked as being available only for iOS 17 and above.
open var isAnimating: Bool { get } /// The preferred treatment to use for HDR images. By default the image view will defer to the value from its traitCollection. open var preferredImageDynamicRange: UIImage.DynamicRange /// The resolved treatment to use for HDR images. open var imageDynamicRange: UIImage.DynamicRange { get } This attribute is not marked as being applicable only in iOS 17+ versions. When viewing the UIImageView code in Xcode, the @available(iOS 17.0, *) annotation was not added, which resulted in successful compilation but caused a crash on iOS 16 devices.
3
0
73
6d
UIScene based state restoration on tvOS not working
I can’t get UIScene-based state restoration to work on tvOS as it does on iOS. UISceneSession.stateRestorationActivity is always nil in UIWindowSceneDelegate.scene(_:willConnectTo:options:) despite UIWindowSceneDelegate.stateRestorationActivity(for:) being called in the previous lifecycle. The NSUserActivityType is correctly configured in the Info.plist. Has anyone encountered the same issue or knows how to get this to work? Sample Project https://github.com/antiraum/tvosSceneStateRestoration Feedback FB20451479
1
0
44
6d
Using UIDocumentViewController with UISplitViewController in Xcode 26
I created a UIKit Document-Based App in Xcode 26. When using UIDocumentViewController on its own, everything works fine. However, when I try to use it with UISplitViewController or add a Toolbar, I run into an issue: the Sidebar and Toolbar UI remain visible above the Document Browser. Older sample projects show a Document-Based App set up with UISplitViewController, but it seems like with the more recent recommended approach, UISplitViewController may no longer be supported. Is that correct? While I could give up on using a Toolbar, I’d really like to know if there’s still a way to use UISplitViewController together with UIDocumentViewController.
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
18
6d
Click on UITextView or UITextField to crash
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x115fadbc0' *** First throw call stack: (0x1940bd8c8 0x1910097c4 0x194159838 0x19403a4f8 0x1940423a0 0x1e42cb9a8 0x1e42ce220 0x106f02c08 0x1080a461c 0x1080be2b0 0x1080acb2c 0x1080ad7b4 0x1080b9b00 0x1080b91a4 0x1eecdb3b8 0x1eecda8c0) libc++abi: terminating due to uncaught exception of type NSException InputAnalytics called timeIntervalSinceReferenceDate in dispatch_sync.The display issue of the call stack occurs in two stages: keyboard input analysis and folding the keyboard. After adding protection to NSString, it can function normally, but I want to know the reason #import "NSString+Safe.h" @implementation NSString (Safe) - (NSTimeInterval)timeIntervalSinceReferenceDate { return 0; } - (NSTimeInterval)timeIntervalSinceDate:(NSDate *)date { return 0; } @end
1
0
69
6d