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

iOS 27.3 beta crash: UISplitViewControllerClassicImpl childViewControllerForStatusBarAxis unrecognized selector (FB25484068)
Selecting a tab in a UITabBarController that contains a classic UISplitViewController crashes our shipped app on the main thread. The app was linked against an older SDK. The same binary works on iOS 27.2 on the same device. We reproduced the crash on iOS 27.3 beta 1 (24C5037i) and beta 2 v2 (24C5049f). Exception: NSInvalidArgumentException: -[UISplitViewControllerClassicImpl childViewControllerForStatusBarAxis]: unrecognized selector sent to instance The stack goes from UITabBarController.setSelectedIndex: through UINavigationController.viewDidMoveToWindow: and the split view controller’s safe-area calculation, then into UIWindow’s status-bar axis lookup. Crash logs for both beta builds are attached to Feedback Assistant report FB25484068. Is this a known UIKit regression in iOS 27.3?
Topic: UI Frameworks SubTopic: UIKit
0
0
57
12h
iPhone Duo side bar is empty after a full-screen modal closes, when a child UITabBarController is sized with Auto Layout
Hi, On iPhone Duo, the vertical tab bar (side bar) shows no tabs after a full-screen modal closes. This happens when the device opened while the modal showed. I filed it as FB25719774. Environment: Xcode 27.2, iPhone Duo simulator, iOS 27.2 (24B91016s). Setup: A container view controller holds a UITabBarController as a child. Auto Layout constraints pin the child view to the 4 edges of the container. override func viewDidLoad() { super.viewDidLoad() addChild(child) child.view.translatesAutoresizingMaskIntoConstraints = false view.addSubview(child.view) NSLayoutConstraint.activate([ child.view.topAnchor.constraint(equalTo: view.topAnchor), child.view.leadingAnchor.constraint(equalTo: view.leadingAnchor), child.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), child.view.bottomAnchor.constraint(equalTo: view.bottomAnchor) ]) child.didMove(toParent: self) }Steps: Fold the device. The side bar shows 4 tabs. Present a view controller with modalPresentationStyle = .fullScreen. While the modal shows, open the device flat. Close the modal. Expected: The side bar shows the 4 tabs, as it did before the modal. Actual: The side bar is empty. The child gets the right frame one layout pass later. But the side bar stays empty, even though tabBar is not hidden and has a normal frame. Workaround: Size the child view with an autoresizing mask while the container is off the window: child.view.frame = view.bounds child.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]However, we could not use the mask all the time. On iOS 17.5, it caused a second issue: after a rotation, a compositional layout inside the child kept the old size classes (FB25719805). So we turn on the mask only while the container is off the window. Related: FB25261013 (https://developer.apple.com/forums/thread/852478) shows the same empty side bar. There, the UITabBarController is added as a child with constraints while the Duo is open. In both cases, Auto Layout has not updated the child frame yet when UIKit sets up the side bar. Link to demo project here: https://transfer.it/t/jd07S2pjxb6A
0
0
89
22h
Vertical tab bar doesn't appear when tab bar controller is added to view controller while iPhone Duo is unfolded
Hi, I would like to share an issue with UITabBarController's vertical tab bar and iPhone Duo's unfolded pose. On iPhone Duo (27.2 beta 3), when tab bar controller is added to the view controller while in unfolded pose, the vertical tab bar doesn't appear unless the tab bar controller view's frame is set manually before adding it to the parent's view. Show any VC. Use unfolded Duo pose. After some time/on button press add a UITabBarController to it: (https://developer.apple.com/documentation/uikit/creating-a-custom-container-view-controller#Add-a-child-view-controller-programmatically-to-your-content) with Auto Layout constraints. Vertical tab bar does not appear. Fold and unfold the device. The tab bar appears. Expected: Tab bar appears after adding the UITabBarController in unfolded Duo pose. Actual: Tab bar does not appear after adding the UITabBarController in unfolded Duo pose. In Feedback Assistant report (FB25261013) I attached minimal reproduction example and recordings showing the different behavior in folded and unfolded poses and behavior with manual frame application fix (commented out in minimal reproduction example). Minimal reproduction example: // SceneDelegate.swift import UIKit 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 } window = UIWindow(windowScene: windowScene) window?.rootViewController = ViewController() window?.makeKeyAndVisible() } } // ViewController.swift import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .systemBackground let button = UIButton(configuration: .filled(), primaryAction: UIAction(title: "Show Tab Bar Controller") { [weak self] _ in self?.showTabBarController() }) button.translatesAutoresizingMaskIntoConstraints = false view.addSubview(button) NSLayoutConstraint.activate([ button.centerXAnchor.constraint(equalTo: view.centerXAnchor), button.centerYAnchor.constraint(equalTo: view.centerYAnchor), ]) } private func showTabBarController() { let tabBarController = UITabBarController() tabBarController.tabs = ["First", "Second", "Third"].map { title in UITab(title: title, image: UIImage(systemName: "circle"), identifier: title) { _ in let viewController = UIViewController() viewController.view.backgroundColor = .systemBackground return viewController } } addChild(tabBarController) // Uncomment to show the tab bar on the unfolded iPhone Duo. tabBarController.view.frame = view.bounds view.addSubview(tabBarController.view) tabBarController.view.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ tabBarController.view.topAnchor.constraint(equalTo: view.topAnchor), tabBarController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor), tabBarController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor), tabBarController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), ]) tabBarController.didMove(toParent: self) } } Thank you in advance.
Topic: UI Frameworks SubTopic: UIKit Tags:
7
0
992
23h
UINavigationController: pushViewController(animated: false) with hidesBottomBarWhenPushed makes the incoming view controller visibly resize from an undersized frame to full screen (iOS 27+)
Hi everyone, I believe I've found a behavior change (or regression) in iOS 27 around UINavigationController when pushing with animated: false to a view controller that sets hidesBottomBarWhenPushed = true. Observed behavior On iOS 27, the incoming view controller appears on screen at a size that still accounts for the tab bar, then expands to the full screen height on the next frame. Since there's no transition animation to mask it, the user sees the whole screen — including its background color — visibly "grow" into place. On iOS 18 and earlier the same code showed the destination view controller instantly at its final size, with no visible resize. That's why this only surfaced after upgrading the device to iOS 27. Minimal reproduction The destination view controller contains no subviews, no xib, no constraints and no layout code — only a background color. So this is unrelated to the content of the pushed screen. UITabBarController subclass with two tabs, each wrapped in a UINavigationController: final class MainTabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() tabBar.tintColor = .systemOrange viewControllers = [ makeNavigationController(root: ViewController(), title: "Home", image: UIImage(systemName: "house")), makeNavigationController(root: PlaceholderViewController(), title: "MENU", image: UIImage(systemName: "safari")), ] } private func makeNavigationController(root: UIViewController, title: String, image: UIImage?) -> UINavigationController { let nav = UINavigationController(rootViewController: root) let appearance = UINavigationBarAppearance() appearance.configureWithOpaqueBackground() appearance.backgroundColor = .white appearance.shadowColor = .clear nav.navigationBar.standardAppearance = appearance nav.navigationBar.scrollEdgeAppearance = appearance nav.tabBarItem = UITabBarItem(title: title, image: image, selectedImage: image) return nav } }ViewController (tab 1 root) — the trigger: class ViewController: UIViewController { private let pushButton: UIButton = { var config = UIButton.Configuration.filled() config.title = "Push" config.baseBackgroundColor = .systemOrange let button = UIButton(configuration: config) button.translatesAutoresizingMaskIntoConstraints = false return button }() override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .systemBackground title = "Home" view.addSubview(pushButton) pushButton.addTarget(self, action: #selector(didTapPushButton), for: .touchUpInside) NSLayoutConstraint.activate([ pushButton.centerXAnchor.constraint(equalTo: view.centerXAnchor), pushButton.centerYAnchor.constraint(equalTo: view.centerYAnchor), ]) } @objc private func didTapPushButton() { let vc = OrangeViewController() vc.hidesBottomBarWhenPushed = true // (1) navigationController?.pushViewController(vc, animated: false) // (2) } }OrangeViewController — the destination: final class OrangeViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .orange } }Steps to reproduce Run on an iOS 27 device or simulator. On the first tab, tap the "Push" button. The orange screen first appears with a height that excludes the tab bar, then expands to full screen on the next frame. What I've already ruled out Both conditions must be present: hidesBottomBarWhenPushedanimatedResulttruefalse❌ Visible resizetruetrue✅ Normal slide-in transitionfalsefalse✅ No visible resizeAdditional findings: The destination view controller has no subviews or constraints, so this isn't a layout problem in my own hierarchy. I also verified that the same resize occurs with a completely empty UIViewController created purely in code — the destination has no storyboard, nib, or constraints at all. Reproduces with a plain UITabBarController + UINavigationController setup — no custom transitions, no UINavigationControllerDelegate, no appearance customization beyond a plain opaque white nav bar. Reproduces on a fresh project created from Xcode's default template. Environment iOS 27.0 (24A434) — device and simulator Xcode 27.0 (27A266a) Fresh project, default template Questions Is pushViewController(animated: false) onto a view controller with hidesBottomBarWhenPushed = true still a supported combination on iOS 27? The behavior change makes me wonder whether this is intended (requiring a workaround on my side) or a regression. If it's a regression, what's the recommended way to perform an animation-less push into a tab-bar-hiding view controller without the intermediate undersized frame? I've tried loadViewIfNeeded() plus manually assigning view.frame before pushing, but I'd rather not depend on private layout timing. I noticed the new UIView.AnimationOptions.flushUpdates (iOS 26+) documentation about flushing pending layout when animation scopes change. Is this behavior change related? Should view controllers pushed without animation be using flushUpdates? Happy to attach the sample project and a screen recording — just let me know the preferred way to submit them. Thanks!
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
393
2d
iOS 27b3 SDK: iOS App on Mac crashes on UISearchBar focus
Our app crashes when compiled with the iOS 27 beta 3 SDK and run as an iOS app on Mac, on both macOS 26 and macOS 27, as soon as a UISearchBar receives focus. The crash is due to this exception: *** Assertion failure in BOOL _screenBasedFocusUnsupported(void)(), UIScreen.m:3.725 Accessing the focus system through UIScreen is no longer supported. ( 0 CoreFoundation 0x000000018bea31c0 __exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000018b91e91c objc_exception_throw + 88 2 Foundation 0x000000018e092644 -[NSMutableDictionary(NSMutableDictionary) initWithContentsOfFile:] + 0 3 UIKitCore 0x00000001c5dae8ec _screenBasedFocusUnsupported + 272 4 UIKitCore 0x00000001c5dae960 -[UIScreen _preferredFocusedWindow] + 24 5 UIKitCore 0x00000001c4ea3a60 -[UIScreen _mainSceneReferenceBounds] + 200 6 UIKitCore 0x00000001c4ea3914 -[UIScreen _mainSceneBoundsForInterfaceOrientation:] + 40 7 UIKitCore 0x00000001c5708134 +[UINavigationBar defaultSizeForOrientation:] + 76 8 UIKitCore 0x00000001c6222c88 -[_UISearchPresentationController _layoutPresentationWithSize:transitionCoordinator:] + 704 9 UIKitCore 0x00000001c622296c -[_UISearchPresentationController containerViewWillLayoutSubviews] + 84 10 UIKitCore 0x00000001c549304c block_destroy_helper.13 + 25112 11 UIKitCore 0x00000001c549344c block_destroy_helper.13 + 26136 12 UIKitCore 0x00000001c4ea26a8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1648 13 QuartzCore 0x0000000196103dbc _ZN2CA5Layer15perform_update_EPS0_P7CALayerjNS_17LayerUpdateReasonEPNS_11TransactionE + 460 14 QuartzCore 0x000000019610390c _ZN2CA5Layer17update_if_needed_EPNS_11TransactionENS_17LayerUpdateReasonE + 692 15 QuartzCore 0x0000000196035d2c _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 608 16 QuartzCore 0x0000000195e69520 _ZN2CA11Transaction6commitEv + 652 17 AppKit 0x0000000190fe116c __37+[NSDisplayCycle currentDisplayCycle]_block_invoke.7 + 44 18 CoreFoundation 0x000000018be34ad0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28 19 CoreFoundation 0x000000018be34a10 __CFRunLoopDoBlocks + 396 20 CoreFoundation 0x000000018be33e54 __CFRunLoopRun + 2356 21 CoreFoundation 0x000000018bf06234 _CFRunLoopRunSpecificWithOptions + 532 22 HIToolbox 0x0000000198c1f560 RunCurrentEventLoopInMode + 320 23 HIToolbox 0x0000000198c228bc ReceiveNextEventCommon + 488 24 HIToolbox 0x0000000198dac14c _BlockUntilNextEventMatchingListInMode + 48 25 AppKit 0x00000001909163d0 _DPSBlockUntilNextEventMatchingListInMode + 228 26 AppKit 0x000000019026a084 _DPSNextEvent + 576 27 AppKit 0x0000000190dff96c -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688 28 AppKit 0x0000000190dff678 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72 29 AppKit 0x000000019025d13c -[NSApplication run] + 368 30 AppKit 0x00000001902357b0 NSApplicationMain + 880 31 AppKit 0x000000019047c958 +[NSWindow _savedFrameFromString:] + 0 32 UIKitMacHelper 0x00000001aa2651bc UINSApplicationMain + 972 33 UIKitCore 0x00000001c4e1aed4 UIApplicationMain + 144 34 UIKitCore 0x00000001c548bda0 block_destroy_helper.31 + 8880 35 DigitalConcertHall.debug.dylib 0x0000000106e41bd8 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 128 36 DigitalConcertHall.debug.dylib 0x0000000106e41b4c $s18DigitalConcertHall11AppDelegateC5$mainyyFZ + 32 37 DigitalConcertHall.debug.dylib 0x0000000106e4afc0 __debug_main_executable_dylib_entry_point + 28 38 dyld 0x000000018b9ac4e4 start + 6992 ) I could not test with the iOS 27 beta 4 SDK due to this blocking issue: https://developer.apple.com/forums/thread/839012 However, when I tried to set up a simple sample project, I could not reproduce the issue. Does anybody know what might be causing this? I filed feedback FB24201508
9
2
2.3k
2d
make search bar appear as bottom toolbar button on iPad? (UIKit)
In UIKit, I really like the layout convention on iPhone where the search bar appears as a button in the toolbar at the bottom of the screen, and the user can tap it to see the actual search bar, also at the bottom. viewController.navigationItem.searchBarPlacementAllowsToolbarIntegration = true viewController.navigationItem.preferredSearchBarPlacement = .integratedButton let spacer = UIBarButtonItem.flexibleSpace() let searchbarPlacer = viewController.navigationItem.searchBarPlacementBarButtonItem viewController.toolbarItems = [spacer, searchbarPlacer]However, on iPad I'm having trouble getting the same effect; the search button wants to appear at the top, in the navigation bar, even though I'm specifically asking it to appear at the bottom, in the toolbar. How do I get the same layout on iPad?
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
48
2d
UIBarButtonItem instances with custom views do not render correctly within the overflow menu of UIToolbar
var items: [UIBarButtonItem] = [] for i in 0...10 { let button = UIButton() button.setTitle("Hello \(i)", for: .normal) button.setTitleColor(.black, for: .normal) let item = UIBarButtonItem(customView: button) items.append(item) } self.setToolbarItems(items, animated: true)When a UIToolbar contains many items, an overflow button appears. If a bar button item is created with a custom view, it cannot be rendered properly in the overflow menu. However, if the item is created using an initializer such as UIBarButtonItem(image:style:target:action:) or UIBarButtonItem(title:style:target:action:), the overflow menu displays it correctly. Environment: iOS 27.0
Topic: UI Frameworks SubTopic: UIKit
0
0
26
2d
Persistent scroll stutter on iPhone 17 Pro Max, 18 Pro Max and 18 Pro (iOS 27.2), also on Apple Store demo units
Affected devices (all show the same problem): 1x iPhone 17 Pro Max 2x iPhone 18 Pro Max 1x iPhone 18 Pro Many demo iPhones at several Apple Stores Current iOS version: 27.2 Issue: Vertical scrolling inside apps frequently stutters and drops frames. It happens in many, many apps, including Apple's own App Store and Apple Store apps. During a normal flick-and-decelerate scroll, the content repeatedly freezes for one or more frames and then jumps forward. Because this reproduces on four of my own devices and on many Apple Store demo units, I believe it is a widespread, system-level issue, not a defect of a single device or my settings. Impact: I have been living with this for more than six months. I use my iPhone heavily every day, and the constant stutter has made using it genuinely distressing. Everything else about iPhone feels excellent, which makes this problem even harder to accept. Steps to reproduce: Open the App Store app (or almost any app with a scrolling list). Scroll with a normal flick and let it decelerate. Observe repeated hitches during the scroll. Measurements: I filmed the screen with a second iPhone at 4K 120 fps and measured content movement frame by frame: iPhone 18 Pro Max, third-party video feed: about 4 hitches per second of scrolling, about 4% of frames dropped, mostly single-frame drops. iPhone 18 Pro Max, third-party social app list: about 11 hitches per second, about 12% of frames dropped, at a regular rhythm every 6-8 frames. About a third of the stalls last 2-3 frames, and the content does not catch up afterwards. iPhone 17 Pro Max, third-party comment list: about 5 hitches per second, about 8% of frames dropped, including several full freezes of 50-75 ms. Expected: Smooth 120 Hz scrolling, as ProMotion is designed to deliver. Is Apple aware of this issue? I am happy to provide videos, frame-by-frame data, or sysdiagnose logs.
4
2
467
4d
State Restoration no longer works in a Mac Catalyst based app when run on macOS 27.x
As reported in FB25363417: A UIKit based app running on macOS 27.2 (or macOS 27.0.1) via Mac Catalyst no longer has functioning state restoration. Upon app restart, there is no NSUserActivity being provided to the scene in the UISceneDelegate method scene(_:willConnectTo:options:). This can be tested with Apple’s own sample app “Restoring your app’s state”. Just update the sample project with support for a Mac Catalyst build. Using Xcode 27.2 on a Mac with macOS 27.0 or 27.2, build and run the Mac Catalyst version of the app. The main screen appears with a list of products. Select any product so you see details of the product. Quit the app. Run the app again. Note that you are not returned to the previously selected product detail screen. Instead, you just see the main list of products. If you run the same app and perform the same steps on a Mac running macOS 26.x, then when the app is restarted, you correctly get returned to the previously selected product detail screen. The problem is being caused by no NSUserActivity being passed into the scene delegate on app startup. While running the app on a Mac with macOS 27.x, put a breakpoint on the initial guard statement in scene(_:willConnectTo:options:) and you will see there is no activity on app restart. This is impacting paid customers of my existing app since upgrading to macOS 27. They no longer get returned to the app’s previous state when restarting the app. It is expected that state restoration should work on macOS 27 just as well as it does under macOS 26 in an app built with Mac Catalyst.
1
0
183
6d
iPhone Duo vertical bar: system back button ignores custom back indicator image (UINavigationBarAppearance.setBackIndicatorImage)
On iPhone Duo (iOS 27.1), when UIKit moves a navigation controller's system back button into the vertical bar, the button always shows the system chevron. Every public API for customizing the back indicator image is ignored there, although the same configuration is honored in the horizontal (top) navigation bar. APIs tested (each one alone, on the second view controller of a UINavigationController stack, with no leftBarButtonItem): A. Nothing set (default). B. UINavigationBar.standardAppearance set to a UINavigationBarAppearance on which setBackIndicatorImage(_:transitionMaskImage:) was called. C. Same appearance assigned to all four UINavigationBar properties: standardAppearance, compactAppearance, scrollEdgeAppearance, compactScrollEdgeAppearance. D. Same appearance assigned to all four UINavigationItem properties of the pushed view controller: standardAppearance, compactAppearance, scrollEdgeAppearance, compactScrollEdgeAppearance. E. Legacy UINavigationBar.backIndicatorImage and UINavigationBar.backIndicatorTransitionMaskImage, with no appearance objects set. F. UINavigationBar.appearance() proxy: all four appearance properties, set before the navigation controller is created. G. UINavigationItem.backBarButtonItem of the previous view controller set to UIBarButtonItem(image:style:target:action:). H. Control: UINavigationItem.leftBarButtonItem set to UIBarButtonItem(image:style:target:action:) with the same image (axisBehavior left at .automatic). The marker image is UIImage(systemName: "arrow.uturn.backward"), so it cannot be mistaken for the system chevron. Results: Top navigation bar (iPhone 17 Pro iOS 27.0, and iPhone Duo open with portrait UI): B, C, D, E and F show the custom image. G shows the chevron followed by the image. Vertical bar (iPhone Duo closed; iPhone Duo open with landscape UI; also inside a UITabBarController with the tab bar hidden or visible): A through G all show the system chevron. Only H shows the custom image. At viewDidAppear, the app confirms that the configuration is in place: navigationBar.standardAppearance.backIndicatorImage is the marker image (B, C), navigationItem.standardAppearance is non-nil (D), and traitCollection.verticalBarEdge is .trailing. This contradicts the guidance given by an Apple Technology Evangelist in https://developer.apple.com/forums/thread/847875: "If you are only replacing the icon on the back button, you could use set the backIndicatorImage and maintain default system behavior. This would be the recommended approach." As things stand, the only way to show a custom back icon in the vertical bar is to replace the system back button with a leading item. That loses the system behavior that comes with it: UINavigationController.interactivePopGestureRecognizer, interactiveContentPopGestureRecognizer and the back-history menu.
Topic: UI Frameworks SubTopic: UIKit Tags:
2
3
563
6d
didUpdateEffectiveGeometry reports outer display frame when app is send to background while using the inner display.
On iPhone Duo, when the app goes into background while being used on the inner display, windowScene(_:didUpdateEffectiveGeometry:) is called with a frame matching the geometry of the outer display.  When the app returns to the foreground, the callback fires again with the inner display geometry. We reload our layouts based on this callback so the transient frame cause a visible relayout when returning to the app. This also reproduces when building with Xcode 27.3 beta and on OS version 27.2.0. Snippet: func windowScene(_ windowScene: UIWindowScene, didUpdateEffectiveGeometry previousEffectiveGeometry: UIWindowScene.Geometry) { log("didUpdateEffectiveGeometry", windowScene) } func sceneDidEnterBackground(_ scene: UIScene) { log("sceneDidEnterBackground", scene) } func sceneWillEnterForeground(_ scene: UIScene) { log("sceneWillEnterForeground", scene) } private func log(_ event: String, _ scene: UIScene) { guard let windowScene = scene as? UIWindowScene else { return } let state = windowScene.activationState == .background ? "background" : "foreground" let size = windowScene.effectiveGeometry.coordinateSpace.bounds.size print("\(event) | state: \(state) | size: \(Int(size.width)) x \(Int(size.height))") }Logs: sceneDidEnterBackground | state: background | size: 951 x 669 didUpdateEffectiveGeometry | state: background | size: 466 x 678 <- outer display size, device NOT folded didUpdateEffectiveGeometry | state: background | size: 951 x 669 sceneWillEnterForeground | state: background | size: 951 x 669Is this the expected behaviour, or a known issue? If it’s expected, what’s the recommended way to distinguish the effective geometry change?
Topic: UI Frameworks SubTopic: UIKit
0
0
39
6d
UITableView row reordering no longer works under macOS 27 with Mac Catalyst
Under macOS 27 using Mac Catalyst for a UIKit-based app, If you present a view controller with a table view as a form sheet or page sheet, row reordering fails to function. You can drag a row as expected but the blue movement bar never appears and if you drop the row it simply returns to its original location. The exact same view controller presented as a popover works just fine. The exact same view controller not presented as a modal (such as the app's root controller) works just fine. This is a serious bug affecting existing applications and being reported by paying customers. This has been reported as FB25038883 which includes a simple sample app demonstrating the issue.
4
1
595
6d
iOS 27: FBSScene crashes in objc_release_x26 after a scene settings update
Feedback Assistant: FB25454822 On iOS 27, our app (com.netshort.abroad) crashes inside FrontBoardServices while releasing an object saved across a synchronous scene-update callout. The stack has only system frames. A build shipped in September 2025 (1.8.3) hits the same crash as soon as the device is updated to iOS 27, so this is not a recent app change. OS: iOS 27.0.0 (24A435), iOS 27.0.1 (24A446) On build 2.3.4: 1264 events, 1216 users 0 libobjc.A.dylib objc_release_x26 + 8 1 FrontBoardServices -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 780 2 FrontBoardServices _queue_updateScene…_block_invoke_2.cold.1 + 352 3 FrontBoardServices _queue_updateScene…_block_invoke_2 + 96 4 FrontBoardServices _calloutQueue_executeCalloutFromSource:withBlock: + 168 On 27.0.0 these frames show as <redacted> in Crashlytics. FrontBoardServices 0x19a88 is this method at 0x1977c plus 780, matching symbolicated 27.0.1 reports. In the 27.0.1 FrontBoardServices binary, +776 is objc_release(x26) and +780 is the return address. x26 is transitionContext.actions. The callout into UIKit is the bl at +0x2ac. The crash happens after that callout returns. 34 Apple crash reports with register state show the same pattern: the low byte of saved x26 is 0x01. 20 reports: objc_release_x26 + 8, x26 = 0x1 14 reports: objc_release_x26 + 16, x26 ends in 0x01 (for example 0x13c373a01) A nil actions value 0x0 becomes 0x1. A real pointer only has its low byte changed, so the isa read is off by one. In the +16 reports, x16 (0x8001000001fa8d89) is that isa shifted by one byte. This looks like a one-byte store of YES into the stack slot where x26 was saved across the callout. There is no single user action that reproduces it. It happens when the system delivers a scene settings update. The frame that wrote the byte is already gone, because the crash is recorded after the callout returns. Has anyone else seen this on iOS 27? I attached three .crash files with full register state to FB25454822.
Topic: UI Frameworks SubTopic: UIKit
1
1
417
1w
A bug in iOS 27.3 beta 2 where the UIHingeInteraction value is received even though it is not an iPhone Duo device.
The device currently showing the symptom is iPhone SE3, iOS 27.3 Beta 2 version installed. (Same symptom exists in Beta 1 as well.) On screen A When switching to another ViewController (screen B) with pushViewController of UINavigationController Declare UIHingeInteraction on screen A and self.view.addInteraction(hInteraction) I added it like the code above. Hinge value comes in. In the sample code below update.hinge value is not nil The update.hinge!.angle value is also displayed as 0. let hInteraction:UIHingeInteraction = UIHingeInteraction { interaction, update in if update.hinge != nil { let hingeAngle:CGFloat = update.hinge!.angle..... }} In apps installed on other iPhone 17 devices (with iOS 27.2 installed), the value does not appear there. A quick fix is ​​needed. I have also submitted a report via Apple Feedback; please ensure this is addressed in the upcoming Beta 3 release. *** Plus *** The horizontalSizeClass and verticalSizeClass properties are returning "Regular" values, similar to how they behave on the iPhone Duo's internal display. Please fix the above issue as well.
0
1
157
1w
UIWindowScene sizeRestrictions minimumSize not working on iPadOS
Hello, following Apple docs and guidance from WWDC I'm trying to set a minimum size for my scene, for example I want it to minimally be 3/4 the width and height of the device. I've removed the UIRequiresFullScreen Info.plist property. The app does run in windowed mode and does have a resizing handle. I've implemented this UISceneDelegate: var window: UIWindow? var cameraWindow: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { window = UIWindow(windowScene: scene as! UIWindowScene) // setup root view controller let rootViewController: MainViewController = MainViewController(nibName: "Main", bundle: nil) let navController: NavigationController = NavigationController(rootViewController: rootViewController) navController.modalPresentationStyle = .fullScreen // set reasonable minimum sizes for WindowScene if let windowScene: UIWindowScene = scene as? UIWindowScene { if #available(iOS 16.0, *) { let windowSize: CGSize = windowScene.coordinateSpace.bounds.size windowScene.sizeRestrictions?.minimumSize.width = windowSize.width * 0.75 windowScene.sizeRestrictions?.minimumSize.height = windowSize.height * 0.75 } } window?.rootViewController = navController window?.makeKeyAndVisible() } } And proven via debugger that this code is being executed. I have the following observations: After setting these minimumSize properties I see the width and height both contain 0 afterwards, as if the property settings are discarding the value. I've even used hard-coded values instead of reading the coordinateSpace.bounds, to no avail. The scene is allowing resizing well below these minimums, about 1/3 the width and 1/2 the height. Anyone else observed this and have suggestions?
Topic: UI Frameworks SubTopic: UIKit
1
1
376
1w
How to disable a custom detent in a UISheetPresentationController
If you are creating a UISheetPresentationController with custom detents and you have a need to disable one of the detents, then you can do so by returning a special value from the detent's resolver. This is addressed in the Objective-C documentation for customDetentWithIdentifier:resolver:. You return the special value UISheetPresentationControllerDetentInactive. For example: UISheetPresentationControllerDetent *customDetent = [UISheetPresentationControllerDetent customDetentWithIdentifier:@"customId" resolver:^CGFloat(id<UISheetPresentationControllerDetentResolutionContext> _Nonnull context) { if (some condition) { return UISheetPresentationControllerDetentInactive; } else { return context.maximumDetentValue / 3.0; } }];However, if you wish to do this in Swift, there is no corresponding API for UISheetPresentationControllerDetentInactive. It turns out that you can just use .greatestFiniteMagnitude instead. For example: let customDetent = UISheetPresentationController.Detent.custom(identifier: .init("customId")) { context in if some condition { return .greatestFiniteMagnitude //UISheetPresentationControllerDetentInactive } else { return context.maximumDetentValue / 3.0 } }It might be tempting to add the following: extension UISheetPresentationController.Detent { static let Inactive = CGFloat.greatestFiniteMagnitude }but this could cause a conflict if Apple adds a similar API in the future. This oversight in the Swift API has been reported as FB25567661.
1
0
138
1w
UIKIt, iOS 27, UIDocumentPickerViewController(forExporting: [fileURL])
My App saves files using the UIDocumentPickerViewController. This works from iOS 17 to 26. Usually, you have a file with a given name in your sandbox, which you can then export via the pickerVC. In the pickerVC you change the name. In iOS 27 the file name is greyed-out and you can't change it here. The file can be exported only with the pre-given name. Is this a new behaviour or bug in iOS 27?
Topic: UI Frameworks SubTopic: UIKit
2
0
174
1w
Adapting a large UIKit/Objective-C document viewer controller for iPhone Duo on the iOS 27.1 SDK
We ship a mature document viewer (PDF) written mostly in Objective-C with UIKit. It runs on iPhone and iPad and supports multiple scenes. We're planning support for iPhone Duo and would like advice on the right architectural approach before we start. Current structure (simplified) One root viewer view controller (a UIViewController subclass, large and long-lived) owns the document view, search, bookmarks, text-to-speech, presentation mode and similar features. Most of these live in categories and helper modules. Chrome is swapped by size class. A factory picks one of two "toolbars controller" classes based on the trait collection: one for compact, one for regular. The regular one also hosts a tab strip and a sidebar built on the system sidebar UI. When the class it would pick changes, traitCollectionDidChange: tears down the current chrome controller, builds the other one, re-parents the document view into the new container, and then restores tool and presentation state. We skip this while the app isn't active, because UIKit sends trait changes during backgrounding. Geometry changes go through viewWillTransitionToSize:withTransitionCoordinator:, which forwards to the chrome controller, the document view and a zoomed handwriting helper. When the transition completes we recompute content insets and re-render the output for an external display. The document view is a custom scroll-based view (not PDFKit). It has display modes for continuous, single page, two-page spread and two-page spread with a cover page. It calculates its own insets from safe areas and whatever chrome is visible. We still use traitCollectionDidChange: and haven't moved to registerForTraitChanges:. Questions Posture changes and size-class flips. When the device folds or unfolds, should we expect a normal viewWillTransitionToSize: plus a trait change (compact ↔ regular) that our existing swap handles? Or is there a posture/display-configuration signal we should observe instead? Swapping the whole chrome hierarchy in the middle of a fold animation seems costly. Is there a recommended way to defer or coordinate that with the transition coordinator? Hinge or seam area. Is the fold region exposed through safe-area insets, layout guides or a new API? A custom scroll view that lays out two-page spreads needs to keep content out of that region, or line the spread up with it. What's the recommended way to get this geometry from Objective-C? Two-page spread tied to posture. Showing a two-page spread automatically when the device is unfolded (like an open book) seems natural. Does Apple recommend deciding this from traits/posture or from bounds, and is there a trait we can override per view controller? Trait registration. For this form factor, is it effectively required to move from traitCollectionDidChange: to registerForTraitChanges: (for example to get notified about new traits), or will the legacy callback still fire reliably? Scenes and external displays. Does iPhone Duo change anything about scene activation, window geometry or UIScreen handling that a multi-scene app with external-display output should plan for? Incremental adoption. Can we adopt this step by step in Objective-C, or do some of the APIs only exist in Swift and push us toward Swift wrappers? Any pointers to WWDC sessions, sample code or documentation for adapting existing UIKit apps would be very helpful. Thanks!
Topic: UI Frameworks SubTopic: UIKit
4
1
390
1w
iOS 27.3 beta crash: UISplitViewControllerClassicImpl childViewControllerForStatusBarAxis unrecognized selector (FB25484068)
Selecting a tab in a UITabBarController that contains a classic UISplitViewController crashes our shipped app on the main thread. The app was linked against an older SDK. The same binary works on iOS 27.2 on the same device. We reproduced the crash on iOS 27.3 beta 1 (24C5037i) and beta 2 v2 (24C5049f). Exception: NSInvalidArgumentException: -[UISplitViewControllerClassicImpl childViewControllerForStatusBarAxis]: unrecognized selector sent to instance The stack goes from UITabBarController.setSelectedIndex: through UINavigationController.viewDidMoveToWindow: and the split view controller’s safe-area calculation, then into UIWindow’s status-bar axis lookup. Crash logs for both beta builds are attached to Feedback Assistant report FB25484068. Is this a known UIKit regression in iOS 27.3?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
57
Activity
12h
iPhone Duo side bar is empty after a full-screen modal closes, when a child UITabBarController is sized with Auto Layout
Hi, On iPhone Duo, the vertical tab bar (side bar) shows no tabs after a full-screen modal closes. This happens when the device opened while the modal showed. I filed it as FB25719774. Environment: Xcode 27.2, iPhone Duo simulator, iOS 27.2 (24B91016s). Setup: A container view controller holds a UITabBarController as a child. Auto Layout constraints pin the child view to the 4 edges of the container. override func viewDidLoad() { super.viewDidLoad() addChild(child) child.view.translatesAutoresizingMaskIntoConstraints = false view.addSubview(child.view) NSLayoutConstraint.activate([ child.view.topAnchor.constraint(equalTo: view.topAnchor), child.view.leadingAnchor.constraint(equalTo: view.leadingAnchor), child.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), child.view.bottomAnchor.constraint(equalTo: view.bottomAnchor) ]) child.didMove(toParent: self) }Steps: Fold the device. The side bar shows 4 tabs. Present a view controller with modalPresentationStyle = .fullScreen. While the modal shows, open the device flat. Close the modal. Expected: The side bar shows the 4 tabs, as it did before the modal. Actual: The side bar is empty. The child gets the right frame one layout pass later. But the side bar stays empty, even though tabBar is not hidden and has a normal frame. Workaround: Size the child view with an autoresizing mask while the container is off the window: child.view.frame = view.bounds child.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]However, we could not use the mask all the time. On iOS 17.5, it caused a second issue: after a rotation, a compositional layout inside the child kept the old size classes (FB25719805). So we turn on the mask only while the container is off the window. Related: FB25261013 (https://developer.apple.com/forums/thread/852478) shows the same empty side bar. There, the UITabBarController is added as a child with constraints while the Duo is open. In both cases, Auto Layout has not updated the child frame yet when UIKit sets up the side bar. Link to demo project here: https://transfer.it/t/jd07S2pjxb6A
Replies
0
Boosts
0
Views
89
Activity
22h
Vertical tab bar doesn't appear when tab bar controller is added to view controller while iPhone Duo is unfolded
Hi, I would like to share an issue with UITabBarController's vertical tab bar and iPhone Duo's unfolded pose. On iPhone Duo (27.2 beta 3), when tab bar controller is added to the view controller while in unfolded pose, the vertical tab bar doesn't appear unless the tab bar controller view's frame is set manually before adding it to the parent's view. Show any VC. Use unfolded Duo pose. After some time/on button press add a UITabBarController to it: (https://developer.apple.com/documentation/uikit/creating-a-custom-container-view-controller#Add-a-child-view-controller-programmatically-to-your-content) with Auto Layout constraints. Vertical tab bar does not appear. Fold and unfold the device. The tab bar appears. Expected: Tab bar appears after adding the UITabBarController in unfolded Duo pose. Actual: Tab bar does not appear after adding the UITabBarController in unfolded Duo pose. In Feedback Assistant report (FB25261013) I attached minimal reproduction example and recordings showing the different behavior in folded and unfolded poses and behavior with manual frame application fix (commented out in minimal reproduction example). Minimal reproduction example: // SceneDelegate.swift import UIKit 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 } window = UIWindow(windowScene: windowScene) window?.rootViewController = ViewController() window?.makeKeyAndVisible() } } // ViewController.swift import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .systemBackground let button = UIButton(configuration: .filled(), primaryAction: UIAction(title: "Show Tab Bar Controller") { [weak self] _ in self?.showTabBarController() }) button.translatesAutoresizingMaskIntoConstraints = false view.addSubview(button) NSLayoutConstraint.activate([ button.centerXAnchor.constraint(equalTo: view.centerXAnchor), button.centerYAnchor.constraint(equalTo: view.centerYAnchor), ]) } private func showTabBarController() { let tabBarController = UITabBarController() tabBarController.tabs = ["First", "Second", "Third"].map { title in UITab(title: title, image: UIImage(systemName: "circle"), identifier: title) { _ in let viewController = UIViewController() viewController.view.backgroundColor = .systemBackground return viewController } } addChild(tabBarController) // Uncomment to show the tab bar on the unfolded iPhone Duo. tabBarController.view.frame = view.bounds view.addSubview(tabBarController.view) tabBarController.view.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ tabBarController.view.topAnchor.constraint(equalTo: view.topAnchor), tabBarController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor), tabBarController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor), tabBarController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), ]) tabBarController.didMove(toParent: self) } } Thank you in advance.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
7
Boosts
0
Views
992
Activity
23h
UINavigationController: pushViewController(animated: false) with hidesBottomBarWhenPushed makes the incoming view controller visibly resize from an undersized frame to full screen (iOS 27+)
Hi everyone, I believe I've found a behavior change (or regression) in iOS 27 around UINavigationController when pushing with animated: false to a view controller that sets hidesBottomBarWhenPushed = true. Observed behavior On iOS 27, the incoming view controller appears on screen at a size that still accounts for the tab bar, then expands to the full screen height on the next frame. Since there's no transition animation to mask it, the user sees the whole screen — including its background color — visibly "grow" into place. On iOS 18 and earlier the same code showed the destination view controller instantly at its final size, with no visible resize. That's why this only surfaced after upgrading the device to iOS 27. Minimal reproduction The destination view controller contains no subviews, no xib, no constraints and no layout code — only a background color. So this is unrelated to the content of the pushed screen. UITabBarController subclass with two tabs, each wrapped in a UINavigationController: final class MainTabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() tabBar.tintColor = .systemOrange viewControllers = [ makeNavigationController(root: ViewController(), title: "Home", image: UIImage(systemName: "house")), makeNavigationController(root: PlaceholderViewController(), title: "MENU", image: UIImage(systemName: "safari")), ] } private func makeNavigationController(root: UIViewController, title: String, image: UIImage?) -> UINavigationController { let nav = UINavigationController(rootViewController: root) let appearance = UINavigationBarAppearance() appearance.configureWithOpaqueBackground() appearance.backgroundColor = .white appearance.shadowColor = .clear nav.navigationBar.standardAppearance = appearance nav.navigationBar.scrollEdgeAppearance = appearance nav.tabBarItem = UITabBarItem(title: title, image: image, selectedImage: image) return nav } }ViewController (tab 1 root) — the trigger: class ViewController: UIViewController { private let pushButton: UIButton = { var config = UIButton.Configuration.filled() config.title = "Push" config.baseBackgroundColor = .systemOrange let button = UIButton(configuration: config) button.translatesAutoresizingMaskIntoConstraints = false return button }() override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .systemBackground title = "Home" view.addSubview(pushButton) pushButton.addTarget(self, action: #selector(didTapPushButton), for: .touchUpInside) NSLayoutConstraint.activate([ pushButton.centerXAnchor.constraint(equalTo: view.centerXAnchor), pushButton.centerYAnchor.constraint(equalTo: view.centerYAnchor), ]) } @objc private func didTapPushButton() { let vc = OrangeViewController() vc.hidesBottomBarWhenPushed = true // (1) navigationController?.pushViewController(vc, animated: false) // (2) } }OrangeViewController — the destination: final class OrangeViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .orange } }Steps to reproduce Run on an iOS 27 device or simulator. On the first tab, tap the "Push" button. The orange screen first appears with a height that excludes the tab bar, then expands to full screen on the next frame. What I've already ruled out Both conditions must be present: hidesBottomBarWhenPushedanimatedResulttruefalse❌ Visible resizetruetrue✅ Normal slide-in transitionfalsefalse✅ No visible resizeAdditional findings: The destination view controller has no subviews or constraints, so this isn't a layout problem in my own hierarchy. I also verified that the same resize occurs with a completely empty UIViewController created purely in code — the destination has no storyboard, nib, or constraints at all. Reproduces with a plain UITabBarController + UINavigationController setup — no custom transitions, no UINavigationControllerDelegate, no appearance customization beyond a plain opaque white nav bar. Reproduces on a fresh project created from Xcode's default template. Environment iOS 27.0 (24A434) — device and simulator Xcode 27.0 (27A266a) Fresh project, default template Questions Is pushViewController(animated: false) onto a view controller with hidesBottomBarWhenPushed = true still a supported combination on iOS 27? The behavior change makes me wonder whether this is intended (requiring a workaround on my side) or a regression. If it's a regression, what's the recommended way to perform an animation-less push into a tab-bar-hiding view controller without the intermediate undersized frame? I've tried loadViewIfNeeded() plus manually assigning view.frame before pushing, but I'd rather not depend on private layout timing. I noticed the new UIView.AnimationOptions.flushUpdates (iOS 26+) documentation about flushing pending layout when animation scopes change. Is this behavior change related? Should view controllers pushed without animation be using flushUpdates? Happy to attach the sample project and a screen recording — just let me know the preferred way to submit them. Thanks!
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
2
Boosts
0
Views
393
Activity
2d
iOS 27b3 SDK: iOS App on Mac crashes on UISearchBar focus
Our app crashes when compiled with the iOS 27 beta 3 SDK and run as an iOS app on Mac, on both macOS 26 and macOS 27, as soon as a UISearchBar receives focus. The crash is due to this exception: *** Assertion failure in BOOL _screenBasedFocusUnsupported(void)(), UIScreen.m:3.725 Accessing the focus system through UIScreen is no longer supported. ( 0 CoreFoundation 0x000000018bea31c0 __exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000018b91e91c objc_exception_throw + 88 2 Foundation 0x000000018e092644 -[NSMutableDictionary(NSMutableDictionary) initWithContentsOfFile:] + 0 3 UIKitCore 0x00000001c5dae8ec _screenBasedFocusUnsupported + 272 4 UIKitCore 0x00000001c5dae960 -[UIScreen _preferredFocusedWindow] + 24 5 UIKitCore 0x00000001c4ea3a60 -[UIScreen _mainSceneReferenceBounds] + 200 6 UIKitCore 0x00000001c4ea3914 -[UIScreen _mainSceneBoundsForInterfaceOrientation:] + 40 7 UIKitCore 0x00000001c5708134 +[UINavigationBar defaultSizeForOrientation:] + 76 8 UIKitCore 0x00000001c6222c88 -[_UISearchPresentationController _layoutPresentationWithSize:transitionCoordinator:] + 704 9 UIKitCore 0x00000001c622296c -[_UISearchPresentationController containerViewWillLayoutSubviews] + 84 10 UIKitCore 0x00000001c549304c block_destroy_helper.13 + 25112 11 UIKitCore 0x00000001c549344c block_destroy_helper.13 + 26136 12 UIKitCore 0x00000001c4ea26a8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1648 13 QuartzCore 0x0000000196103dbc _ZN2CA5Layer15perform_update_EPS0_P7CALayerjNS_17LayerUpdateReasonEPNS_11TransactionE + 460 14 QuartzCore 0x000000019610390c _ZN2CA5Layer17update_if_needed_EPNS_11TransactionENS_17LayerUpdateReasonE + 692 15 QuartzCore 0x0000000196035d2c _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 608 16 QuartzCore 0x0000000195e69520 _ZN2CA11Transaction6commitEv + 652 17 AppKit 0x0000000190fe116c __37+[NSDisplayCycle currentDisplayCycle]_block_invoke.7 + 44 18 CoreFoundation 0x000000018be34ad0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28 19 CoreFoundation 0x000000018be34a10 __CFRunLoopDoBlocks + 396 20 CoreFoundation 0x000000018be33e54 __CFRunLoopRun + 2356 21 CoreFoundation 0x000000018bf06234 _CFRunLoopRunSpecificWithOptions + 532 22 HIToolbox 0x0000000198c1f560 RunCurrentEventLoopInMode + 320 23 HIToolbox 0x0000000198c228bc ReceiveNextEventCommon + 488 24 HIToolbox 0x0000000198dac14c _BlockUntilNextEventMatchingListInMode + 48 25 AppKit 0x00000001909163d0 _DPSBlockUntilNextEventMatchingListInMode + 228 26 AppKit 0x000000019026a084 _DPSNextEvent + 576 27 AppKit 0x0000000190dff96c -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688 28 AppKit 0x0000000190dff678 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72 29 AppKit 0x000000019025d13c -[NSApplication run] + 368 30 AppKit 0x00000001902357b0 NSApplicationMain + 880 31 AppKit 0x000000019047c958 +[NSWindow _savedFrameFromString:] + 0 32 UIKitMacHelper 0x00000001aa2651bc UINSApplicationMain + 972 33 UIKitCore 0x00000001c4e1aed4 UIApplicationMain + 144 34 UIKitCore 0x00000001c548bda0 block_destroy_helper.31 + 8880 35 DigitalConcertHall.debug.dylib 0x0000000106e41bd8 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 128 36 DigitalConcertHall.debug.dylib 0x0000000106e41b4c $s18DigitalConcertHall11AppDelegateC5$mainyyFZ + 32 37 DigitalConcertHall.debug.dylib 0x0000000106e4afc0 __debug_main_executable_dylib_entry_point + 28 38 dyld 0x000000018b9ac4e4 start + 6992 ) I could not test with the iOS 27 beta 4 SDK due to this blocking issue: https://developer.apple.com/forums/thread/839012 However, when I tried to set up a simple sample project, I could not reproduce the issue. Does anybody know what might be causing this? I filed feedback FB24201508
Replies
9
Boosts
2
Views
2.3k
Activity
2d
make search bar appear as bottom toolbar button on iPad? (UIKit)
In UIKit, I really like the layout convention on iPhone where the search bar appears as a button in the toolbar at the bottom of the screen, and the user can tap it to see the actual search bar, also at the bottom. viewController.navigationItem.searchBarPlacementAllowsToolbarIntegration = true viewController.navigationItem.preferredSearchBarPlacement = .integratedButton let spacer = UIBarButtonItem.flexibleSpace() let searchbarPlacer = viewController.navigationItem.searchBarPlacementBarButtonItem viewController.toolbarItems = [spacer, searchbarPlacer]However, on iPad I'm having trouble getting the same effect; the search button wants to appear at the top, in the navigation bar, even though I'm specifically asking it to appear at the bottom, in the toolbar. How do I get the same layout on iPad?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
0
Boosts
0
Views
48
Activity
2d
UIBarButtonItem instances with custom views do not render correctly within the overflow menu of UIToolbar
var items: [UIBarButtonItem] = [] for i in 0...10 { let button = UIButton() button.setTitle("Hello \(i)", for: .normal) button.setTitleColor(.black, for: .normal) let item = UIBarButtonItem(customView: button) items.append(item) } self.setToolbarItems(items, animated: true)When a UIToolbar contains many items, an overflow button appears. If a bar button item is created with a custom view, it cannot be rendered properly in the overflow menu. However, if the item is created using an initializer such as UIBarButtonItem(image:style:target:action:) or UIBarButtonItem(title:style:target:action:), the overflow menu displays it correctly. Environment: iOS 27.0
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
26
Activity
2d
Persistent scroll stutter on iPhone 17 Pro Max, 18 Pro Max and 18 Pro (iOS 27.2), also on Apple Store demo units
Affected devices (all show the same problem): 1x iPhone 17 Pro Max 2x iPhone 18 Pro Max 1x iPhone 18 Pro Many demo iPhones at several Apple Stores Current iOS version: 27.2 Issue: Vertical scrolling inside apps frequently stutters and drops frames. It happens in many, many apps, including Apple's own App Store and Apple Store apps. During a normal flick-and-decelerate scroll, the content repeatedly freezes for one or more frames and then jumps forward. Because this reproduces on four of my own devices and on many Apple Store demo units, I believe it is a widespread, system-level issue, not a defect of a single device or my settings. Impact: I have been living with this for more than six months. I use my iPhone heavily every day, and the constant stutter has made using it genuinely distressing. Everything else about iPhone feels excellent, which makes this problem even harder to accept. Steps to reproduce: Open the App Store app (or almost any app with a scrolling list). Scroll with a normal flick and let it decelerate. Observe repeated hitches during the scroll. Measurements: I filmed the screen with a second iPhone at 4K 120 fps and measured content movement frame by frame: iPhone 18 Pro Max, third-party video feed: about 4 hitches per second of scrolling, about 4% of frames dropped, mostly single-frame drops. iPhone 18 Pro Max, third-party social app list: about 11 hitches per second, about 12% of frames dropped, at a regular rhythm every 6-8 frames. About a third of the stalls last 2-3 frames, and the content does not catch up afterwards. iPhone 17 Pro Max, third-party comment list: about 5 hitches per second, about 8% of frames dropped, including several full freezes of 50-75 ms. Expected: Smooth 120 Hz scrolling, as ProMotion is designed to deliver. Is Apple aware of this issue? I am happy to provide videos, frame-by-frame data, or sysdiagnose logs.
Replies
4
Boosts
2
Views
467
Activity
4d
State Restoration no longer works in a Mac Catalyst based app when run on macOS 27.x
As reported in FB25363417: A UIKit based app running on macOS 27.2 (or macOS 27.0.1) via Mac Catalyst no longer has functioning state restoration. Upon app restart, there is no NSUserActivity being provided to the scene in the UISceneDelegate method scene(_:willConnectTo:options:). This can be tested with Apple’s own sample app “Restoring your app’s state”. Just update the sample project with support for a Mac Catalyst build. Using Xcode 27.2 on a Mac with macOS 27.0 or 27.2, build and run the Mac Catalyst version of the app. The main screen appears with a list of products. Select any product so you see details of the product. Quit the app. Run the app again. Note that you are not returned to the previously selected product detail screen. Instead, you just see the main list of products. If you run the same app and perform the same steps on a Mac running macOS 26.x, then when the app is restarted, you correctly get returned to the previously selected product detail screen. The problem is being caused by no NSUserActivity being passed into the scene delegate on app startup. While running the app on a Mac with macOS 27.x, put a breakpoint on the initial guard statement in scene(_:willConnectTo:options:) and you will see there is no activity on app restart. This is impacting paid customers of my existing app since upgrading to macOS 27. They no longer get returned to the app’s previous state when restarting the app. It is expected that state restoration should work on macOS 27 just as well as it does under macOS 26 in an app built with Mac Catalyst.
Replies
1
Boosts
0
Views
183
Activity
6d
iPhone Duo vertical bar: system back button ignores custom back indicator image (UINavigationBarAppearance.setBackIndicatorImage)
On iPhone Duo (iOS 27.1), when UIKit moves a navigation controller's system back button into the vertical bar, the button always shows the system chevron. Every public API for customizing the back indicator image is ignored there, although the same configuration is honored in the horizontal (top) navigation bar. APIs tested (each one alone, on the second view controller of a UINavigationController stack, with no leftBarButtonItem): A. Nothing set (default). B. UINavigationBar.standardAppearance set to a UINavigationBarAppearance on which setBackIndicatorImage(_:transitionMaskImage:) was called. C. Same appearance assigned to all four UINavigationBar properties: standardAppearance, compactAppearance, scrollEdgeAppearance, compactScrollEdgeAppearance. D. Same appearance assigned to all four UINavigationItem properties of the pushed view controller: standardAppearance, compactAppearance, scrollEdgeAppearance, compactScrollEdgeAppearance. E. Legacy UINavigationBar.backIndicatorImage and UINavigationBar.backIndicatorTransitionMaskImage, with no appearance objects set. F. UINavigationBar.appearance() proxy: all four appearance properties, set before the navigation controller is created. G. UINavigationItem.backBarButtonItem of the previous view controller set to UIBarButtonItem(image:style:target:action:). H. Control: UINavigationItem.leftBarButtonItem set to UIBarButtonItem(image:style:target:action:) with the same image (axisBehavior left at .automatic). The marker image is UIImage(systemName: "arrow.uturn.backward"), so it cannot be mistaken for the system chevron. Results: Top navigation bar (iPhone 17 Pro iOS 27.0, and iPhone Duo open with portrait UI): B, C, D, E and F show the custom image. G shows the chevron followed by the image. Vertical bar (iPhone Duo closed; iPhone Duo open with landscape UI; also inside a UITabBarController with the tab bar hidden or visible): A through G all show the system chevron. Only H shows the custom image. At viewDidAppear, the app confirms that the configuration is in place: navigationBar.standardAppearance.backIndicatorImage is the marker image (B, C), navigationItem.standardAppearance is non-nil (D), and traitCollection.verticalBarEdge is .trailing. This contradicts the guidance given by an Apple Technology Evangelist in https://developer.apple.com/forums/thread/847875: "If you are only replacing the icon on the back button, you could use set the backIndicatorImage and maintain default system behavior. This would be the recommended approach." As things stand, the only way to show a custom back icon in the vertical bar is to replace the system back button with a leading item. That loses the system behavior that comes with it: UINavigationController.interactivePopGestureRecognizer, interactiveContentPopGestureRecognizer and the back-history menu.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
2
Boosts
3
Views
563
Activity
6d
didUpdateEffectiveGeometry reports outer display frame when app is send to background while using the inner display.
On iPhone Duo, when the app goes into background while being used on the inner display, windowScene(_:didUpdateEffectiveGeometry:) is called with a frame matching the geometry of the outer display.  When the app returns to the foreground, the callback fires again with the inner display geometry. We reload our layouts based on this callback so the transient frame cause a visible relayout when returning to the app. This also reproduces when building with Xcode 27.3 beta and on OS version 27.2.0. Snippet: func windowScene(_ windowScene: UIWindowScene, didUpdateEffectiveGeometry previousEffectiveGeometry: UIWindowScene.Geometry) { log("didUpdateEffectiveGeometry", windowScene) } func sceneDidEnterBackground(_ scene: UIScene) { log("sceneDidEnterBackground", scene) } func sceneWillEnterForeground(_ scene: UIScene) { log("sceneWillEnterForeground", scene) } private func log(_ event: String, _ scene: UIScene) { guard let windowScene = scene as? UIWindowScene else { return } let state = windowScene.activationState == .background ? "background" : "foreground" let size = windowScene.effectiveGeometry.coordinateSpace.bounds.size print("\(event) | state: \(state) | size: \(Int(size.width)) x \(Int(size.height))") }Logs: sceneDidEnterBackground | state: background | size: 951 x 669 didUpdateEffectiveGeometry | state: background | size: 466 x 678 <- outer display size, device NOT folded didUpdateEffectiveGeometry | state: background | size: 951 x 669 sceneWillEnterForeground | state: background | size: 951 x 669Is this the expected behaviour, or a known issue? If it’s expected, what’s the recommended way to distinguish the effective geometry change?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
39
Activity
6d
UITableView row reordering no longer works under macOS 27 with Mac Catalyst
Under macOS 27 using Mac Catalyst for a UIKit-based app, If you present a view controller with a table view as a form sheet or page sheet, row reordering fails to function. You can drag a row as expected but the blue movement bar never appears and if you drop the row it simply returns to its original location. The exact same view controller presented as a popover works just fine. The exact same view controller not presented as a modal (such as the app's root controller) works just fine. This is a serious bug affecting existing applications and being reported by paying customers. This has been reported as FB25038883 which includes a simple sample app demonstrating the issue.
Replies
4
Boosts
1
Views
595
Activity
6d
iOS 27: FBSScene crashes in objc_release_x26 after a scene settings update
Feedback Assistant: FB25454822 On iOS 27, our app (com.netshort.abroad) crashes inside FrontBoardServices while releasing an object saved across a synchronous scene-update callout. The stack has only system frames. A build shipped in September 2025 (1.8.3) hits the same crash as soon as the device is updated to iOS 27, so this is not a recent app change. OS: iOS 27.0.0 (24A435), iOS 27.0.1 (24A446) On build 2.3.4: 1264 events, 1216 users 0 libobjc.A.dylib objc_release_x26 + 8 1 FrontBoardServices -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 780 2 FrontBoardServices _queue_updateScene…_block_invoke_2.cold.1 + 352 3 FrontBoardServices _queue_updateScene…_block_invoke_2 + 96 4 FrontBoardServices _calloutQueue_executeCalloutFromSource:withBlock: + 168 On 27.0.0 these frames show as <redacted> in Crashlytics. FrontBoardServices 0x19a88 is this method at 0x1977c plus 780, matching symbolicated 27.0.1 reports. In the 27.0.1 FrontBoardServices binary, +776 is objc_release(x26) and +780 is the return address. x26 is transitionContext.actions. The callout into UIKit is the bl at +0x2ac. The crash happens after that callout returns. 34 Apple crash reports with register state show the same pattern: the low byte of saved x26 is 0x01. 20 reports: objc_release_x26 + 8, x26 = 0x1 14 reports: objc_release_x26 + 16, x26 ends in 0x01 (for example 0x13c373a01) A nil actions value 0x0 becomes 0x1. A real pointer only has its low byte changed, so the isa read is off by one. In the +16 reports, x16 (0x8001000001fa8d89) is that isa shifted by one byte. This looks like a one-byte store of YES into the stack slot where x26 was saved across the callout. There is no single user action that reproduces it. It happens when the system delivers a scene settings update. The frame that wrote the byte is already gone, because the crash is recorded after the callout returns. Has anyone else seen this on iOS 27? I attached three .crash files with full register state to FB25454822.
Topic: UI Frameworks SubTopic: UIKit
Replies
1
Boosts
1
Views
417
Activity
1w
A bug in iOS 27.3 beta 2 where the UIHingeInteraction value is received even though it is not an iPhone Duo device.
The device currently showing the symptom is iPhone SE3, iOS 27.3 Beta 2 version installed. (Same symptom exists in Beta 1 as well.) On screen A When switching to another ViewController (screen B) with pushViewController of UINavigationController Declare UIHingeInteraction on screen A and self.view.addInteraction(hInteraction) I added it like the code above. Hinge value comes in. In the sample code below update.hinge value is not nil The update.hinge!.angle value is also displayed as 0. let hInteraction:UIHingeInteraction = UIHingeInteraction { interaction, update in if update.hinge != nil { let hingeAngle:CGFloat = update.hinge!.angle..... }} In apps installed on other iPhone 17 devices (with iOS 27.2 installed), the value does not appear there. A quick fix is ​​needed. I have also submitted a report via Apple Feedback; please ensure this is addressed in the upcoming Beta 3 release. *** Plus *** The horizontalSizeClass and verticalSizeClass properties are returning "Regular" values, similar to how they behave on the iPhone Duo's internal display. Please fix the above issue as well.
Replies
0
Boosts
1
Views
157
Activity
1w
UIWindowScene sizeRestrictions minimumSize not working on iPadOS
Hello, following Apple docs and guidance from WWDC I'm trying to set a minimum size for my scene, for example I want it to minimally be 3/4 the width and height of the device. I've removed the UIRequiresFullScreen Info.plist property. The app does run in windowed mode and does have a resizing handle. I've implemented this UISceneDelegate: var window: UIWindow? var cameraWindow: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { window = UIWindow(windowScene: scene as! UIWindowScene) // setup root view controller let rootViewController: MainViewController = MainViewController(nibName: "Main", bundle: nil) let navController: NavigationController = NavigationController(rootViewController: rootViewController) navController.modalPresentationStyle = .fullScreen // set reasonable minimum sizes for WindowScene if let windowScene: UIWindowScene = scene as? UIWindowScene { if #available(iOS 16.0, *) { let windowSize: CGSize = windowScene.coordinateSpace.bounds.size windowScene.sizeRestrictions?.minimumSize.width = windowSize.width * 0.75 windowScene.sizeRestrictions?.minimumSize.height = windowSize.height * 0.75 } } window?.rootViewController = navController window?.makeKeyAndVisible() } } And proven via debugger that this code is being executed. I have the following observations: After setting these minimumSize properties I see the width and height both contain 0 afterwards, as if the property settings are discarding the value. I've even used hard-coded values instead of reading the coordinateSpace.bounds, to no avail. The scene is allowing resizing well below these minimums, about 1/3 the width and 1/2 the height. Anyone else observed this and have suggestions?
Topic: UI Frameworks SubTopic: UIKit
Replies
1
Boosts
1
Views
376
Activity
1w
Using SF Symbols with a changed global locale
When changing the global locale by std::locale::global(std::locale(NAME)) where NAME is a valid and supported name of a locale all access using [UIImage systemImageNamed:@"..."] fails. Is there a way to modify the global locale and still have access to the SF Symbols?
Replies
2
Boosts
0
Views
316
Activity
1w
How to disable a custom detent in a UISheetPresentationController
If you are creating a UISheetPresentationController with custom detents and you have a need to disable one of the detents, then you can do so by returning a special value from the detent's resolver. This is addressed in the Objective-C documentation for customDetentWithIdentifier:resolver:. You return the special value UISheetPresentationControllerDetentInactive. For example: UISheetPresentationControllerDetent *customDetent = [UISheetPresentationControllerDetent customDetentWithIdentifier:@"customId" resolver:^CGFloat(id<UISheetPresentationControllerDetentResolutionContext> _Nonnull context) { if (some condition) { return UISheetPresentationControllerDetentInactive; } else { return context.maximumDetentValue / 3.0; } }];However, if you wish to do this in Swift, there is no corresponding API for UISheetPresentationControllerDetentInactive. It turns out that you can just use .greatestFiniteMagnitude instead. For example: let customDetent = UISheetPresentationController.Detent.custom(identifier: .init("customId")) { context in if some condition { return .greatestFiniteMagnitude //UISheetPresentationControllerDetentInactive } else { return context.maximumDetentValue / 3.0 } }It might be tempting to add the following: extension UISheetPresentationController.Detent { static let Inactive = CGFloat.greatestFiniteMagnitude }but this could cause a conflict if Apple adds a similar API in the future. This oversight in the Swift API has been reported as FB25567661.
Replies
1
Boosts
0
Views
138
Activity
1w
UIKIt, iOS 27, UIDocumentPickerViewController(forExporting: [fileURL])
My App saves files using the UIDocumentPickerViewController. This works from iOS 17 to 26. Usually, you have a file with a given name in your sandbox, which you can then export via the pickerVC. In the pickerVC you change the name. In iOS 27 the file name is greyed-out and you can't change it here. The file can be exported only with the pre-given name. Is this a new behaviour or bug in iOS 27?
Topic: UI Frameworks SubTopic: UIKit
Replies
2
Boosts
0
Views
174
Activity
1w
Adapting a large UIKit/Objective-C document viewer controller for iPhone Duo on the iOS 27.1 SDK
We ship a mature document viewer (PDF) written mostly in Objective-C with UIKit. It runs on iPhone and iPad and supports multiple scenes. We're planning support for iPhone Duo and would like advice on the right architectural approach before we start. Current structure (simplified) One root viewer view controller (a UIViewController subclass, large and long-lived) owns the document view, search, bookmarks, text-to-speech, presentation mode and similar features. Most of these live in categories and helper modules. Chrome is swapped by size class. A factory picks one of two "toolbars controller" classes based on the trait collection: one for compact, one for regular. The regular one also hosts a tab strip and a sidebar built on the system sidebar UI. When the class it would pick changes, traitCollectionDidChange: tears down the current chrome controller, builds the other one, re-parents the document view into the new container, and then restores tool and presentation state. We skip this while the app isn't active, because UIKit sends trait changes during backgrounding. Geometry changes go through viewWillTransitionToSize:withTransitionCoordinator:, which forwards to the chrome controller, the document view and a zoomed handwriting helper. When the transition completes we recompute content insets and re-render the output for an external display. The document view is a custom scroll-based view (not PDFKit). It has display modes for continuous, single page, two-page spread and two-page spread with a cover page. It calculates its own insets from safe areas and whatever chrome is visible. We still use traitCollectionDidChange: and haven't moved to registerForTraitChanges:. Questions Posture changes and size-class flips. When the device folds or unfolds, should we expect a normal viewWillTransitionToSize: plus a trait change (compact ↔ regular) that our existing swap handles? Or is there a posture/display-configuration signal we should observe instead? Swapping the whole chrome hierarchy in the middle of a fold animation seems costly. Is there a recommended way to defer or coordinate that with the transition coordinator? Hinge or seam area. Is the fold region exposed through safe-area insets, layout guides or a new API? A custom scroll view that lays out two-page spreads needs to keep content out of that region, or line the spread up with it. What's the recommended way to get this geometry from Objective-C? Two-page spread tied to posture. Showing a two-page spread automatically when the device is unfolded (like an open book) seems natural. Does Apple recommend deciding this from traits/posture or from bounds, and is there a trait we can override per view controller? Trait registration. For this form factor, is it effectively required to move from traitCollectionDidChange: to registerForTraitChanges: (for example to get notified about new traits), or will the legacy callback still fire reliably? Scenes and external displays. Does iPhone Duo change anything about scene activation, window geometry or UIScreen handling that a multi-scene app with external-display output should plan for? Incremental adoption. Can we adopt this step by step in Objective-C, or do some of the APIs only exist in Swift and push us toward Swift wrappers? Any pointers to WWDC sessions, sample code or documentation for adapting existing UIKit apps would be very helpful. Thanks!
Topic: UI Frameworks SubTopic: UIKit
Replies
4
Boosts
1
Views
390
Activity
1w