Overview
I have the following view hierarchy that mixes SwiftUI and UIKit:
AccordionView
└─ VStack
├─ Text
├─ Button
└─ UIViewRepresentable
└─ UIStackView
├─ UILabel
└─ UILabel
When tapping the button, the UIViewRepresentable hides and shows its content. This all works as expected.
However, in certain circumstances the view's sizing is rendered with the correct size, but the text can often render incorrectly, despite the frame seemingly looking as though it has enough room to render the text.
More info
Below you can see the UILabel has the correct frame height (the light grey background and coloured borders) but the text is rendered as though it has infinite width along one line.
There's a few configurations of my view hierarchy that seem to have this effect.
I've added a playground to the bottom of this post of various configurations to show what does and doesn't work, just copy and paste to see for yourself...
It seems of the ones that don't work, there's a couple of reasons why that may be:
HostedView and TextViewContainer do not do the following (I think we only need to do one of these things for auto layout/stack views to work effectively):
a) implement an intrinsic content size
b) return a 'good' size for systemLayoutSizeFitting().
UIHostingController shouldn't use intrinsic size (although I'm sure it should)
Something related to setting setContentCompressionResistancePriority() or setContentHuggingPriority() but having played about with this it doesn't seem relevant here...
I've played around with everything I can think of here but can't find a solution that works for all, although I'm 99% sure it's one or all of the points above.
If there are any UIKit gurus out there that can help that would be great! Ive already spent so much time on this 🫨
Playground
Swift Playground
UIKit
RSS for tagConstruct and manage graphical, event-driven user interfaces for iOS or tvOS apps using UIKit.
Posts under UIKit tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
[Submitted as FB21958289]
A minimal SwiftUI app logs framework warnings when a bottom bar Menu is used with the system search toolbar item. The most severe issue is logged as a console Fault (full logs below):
Adding 'UIKitToolbar' as a subview of UIHostingController.view is not supported and may result in a broken view hierarchy. Add your view above UIHostingController.view in a common superview or insert it into your SwiftUI content in a UIViewRepresentable instead.
This appears to be a framework-level SwiftUI/UIKit integration issue, not custom UIKit embedding in app code. The UI may still render, but the warnings indicate an internal hierarchy/layout conflict.
This occurs in simulator and physical device.
REPRO STEPS
Create a new project then replace ContentView with the code below.
Run the app.
The view uses NavigationStack + .searchable + .toolbar with:
ToolbarItem(placement: .bottomBar) containing a Menu
DefaultToolbarItem(kind: .search, placement: .bottomBar)
EXPECTED RESULT
No view hierarchy or Auto Layout warnings in the console.
ACTUAL RESULT
Console logs warnings such as:
"Adding 'UIKitToolbar' as a subview of UIHostingController.view is not supported..."
"Ignoring searchBarPlacementBarButtonItem because its vending navigation item does not match the view controller's..."
"Unable to simultaneously satisfy constraints..." (ButtonWrapper/UIButtonBarButton width and trailing constraints)
MINIMAL REPRO CODE
import SwiftUI
struct ContentView: View {
@State private var searchText = ""
@State private var isSearchPresented = false
var body: some View {
NavigationStack {
List(0..<30, id: \.self) { index in
Text("Row \(index)")
}
.navigationTitle("Toolbar Repro")
.searchable(text: $searchText, isPresented: $isSearchPresented)
.toolbar {
ToolbarItem(placement: .bottomBar) {
Menu {
Button("Action 1") { }
Button("Action 2") { }
} label: {
Label("Actions", systemImage: "ellipsis.circle")
}
}
DefaultToolbarItem(kind: .search, placement: .bottomBar)
}
}
}
}
CONSOLE LOG
Adding 'UIKitToolbar' as a subview of UIHostingController.view is not supported and may result in a broken view hierarchy. Add your view above UIHostingController.view in a common superview or insert it into your SwiftUI content in a UIViewRepresentable instead.
Ignoring searchBarPlacementBarButtonItem because its vending navigation item does not match the view controller's. view controller: <_TtGC7SwiftUI32NavigationStackHostingControllerVS_7AnyView_: 0x106014c00>; vc's navigationItem = <UINavigationItem: 0x105530320> title='Toolbar Repro' style=navigator searchController=0x106131200 SearchBarHidesWhenScrolling-default; vending navigation item <UINavigationItem: 0x106db4270> style=navigator searchController=0x106131200 SearchBarHidesWhenScrolling-explicit
Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x600002171450 _TtC5UIKitP33_DDE14AA6B49FCAFC5A54255A118E1D8713ButtonWrapper:0x106a31fe0.width == _UIButtonBarButton:0x106dc4010.width (active)>",
"<NSLayoutConstraint:0x6000021558b0 'IB_Leading_Leading' H:|-(8)-[_UIModernBarButton:0x106a38010] (active, names: '|':_UIButtonBarButton:0x106dc4010 )>",
"<NSLayoutConstraint:0x600002170eb0 'IB_Trailing_Trailing' H:[_UIModernBarButton:0x106a38010]-(8)-| (active, names: '|':_UIButtonBarButton:0x106dc4010 )>",
"<NSLayoutConstraint:0x60000210aa80 'UIView-Encapsulated-Layout-Width' _TtC5UIKitP33_DDE14AA6B49FCAFC5A54255A118E1D8713ButtonWrapper:0x106a31fe0.width == 0 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600002170eb0 'IB_Trailing_Trailing' H:[_UIModernBarButton:0x106a38010]-(8)-| (active, names: '|':_UIButtonBarButton:0x106dc4010 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
Failed to send CA Event for app launch measurements for ca_event_type: 0 event_name: com.apple.app_launch_measurement.FirstFramePresentationMetric
Failed to send CA Event for app launch measurements for ca_event_type: 1 event_name: com.apple.app_launch_measurement.ExtendedLaunchMetrics
Since iOS 26, navigationController?.toolbar no longer appears in the view hierarchy, and UIToolbar itself is not visible in the view tree.
Is there currently any supported way to access the toolbar’s container view or its underlying view hierarchy?
However, the API itself is not deprecated.
https://developer.apple.com/documentation/uikit/uinavigationcontroller/toolbar
Hello. I have an 12 year old app that still has some objective-c code in it. I have a place where i have a flip animation between 2 view controllers that looks like this:
[UIView transitionFromView:origView
toView:newViewController.view
duration:0.5
options:UIViewAnimationOptionTransitionFlipFromRight
completion:nil];
It has looked like this since 2012 at least.
In our production release, it works prior to 26.1, but in 26.1 and 26.2, the flip is off-center and looks weird. it's like both edges flip the same way. It's a little bit hard to explain.
If seen at least 2 other app store apps that i have installed behave this way too, from 26.1 and onwards.
Anyone else seen this? Is there anything that can be done about it?
Thankful for thoughts.
Platform
UIKit
iOS
UIActivityViewController
Environment
Device (issue reported): iPhone 16
iOS Version: 26.2
App Type: UIKit / Swift (standard modal presentation of UIActivityViewController)
Summary
When presenting UIActivityViewController to share a CSV file, the share sheet does not allow vertical scrolling, making lower actions (including Save to Files) unreachable.
The same flow works correctly when sharing a PDF, and the issue cannot be reproduced on other test devices.
Steps to Reproduce
Launch the app and log in
Navigate to More → Reports
Tap Export Report
Choose Export Report (CSV)
Observe the share sheet
Expected Result
The user should be able to vertically scroll the share sheet
All share actions (including Save to Files) should be reachable
Actual Result
Share sheet opens but vertical scrolling is disabled
Lower options (including Save to Files) are not reachable
No crash or console errors
I run into a layout problem where I cannot center an image inside ScrollView which is also inside Navigation Controller. The problem is surely the fact that there is a navigation bar because using this view without NavigationContoller works fine and the image is centered but I don’t know how to account for the space that navigation bar takes up.
Here is the code:
import UIKit
class PhotoViewController: UIViewController {
var photoName: String
private lazy var photoView = {
let image = UIImageView()
image.translatesAutoresizingMaskIntoConstraints = false
image.contentMode = .scaleAspectFit
image.clipsToBounds = true
return image
}()
var photoViewBottomConstraint: NSLayoutConstraint?
var photoViewLeadingConstraint: NSLayoutConstraint?
var photoViewTopConstraint: NSLayoutConstraint?
var photoViewTrailingConstraint: NSLayoutConstraint?
private lazy var scrollView = {
let sv = UIScrollView()
sv.translatesAutoresizingMaskIntoConstraints = false
return sv
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
updateMinZoomScaleForSize(view.bounds.size)
}
func updateMinZoomScaleForSize(_ size: CGSize) {
let widthScale = size.width / photoView.bounds.width
let heightScale = size.height / photoView.bounds.height
let minScale = min(widthScale, heightScale)
scrollView.minimumZoomScale = minScale
scrollView.zoomScale = minScale
}
func setupUI() {
photoView.image = UIImage(named: photoName)
scrollView.delegate = self
view.addSubview(scrollView)
scrollView.addSubview(photoView)
setupConstraints()
}
func setupConstraints() {
NSLayoutConstraint.activate([
scrollView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor),
scrollView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor),
scrollView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor),
scrollView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor)
])
photoViewLeadingConstraint = NSLayoutConstraint(
item: photoView,
attribute: .leading,
relatedBy: .equal,
toItem: scrollView,
attribute: .leading,
multiplier: 1,
constant: 0
)
photoViewTopConstraint = NSLayoutConstraint(
item: photoView,
attribute: .top,
relatedBy: .equal,
toItem: scrollView,
attribute: .top,
multiplier: 1,
constant: 0
)
photoViewTrailingConstraint = NSLayoutConstraint(
item: photoView,
attribute: .trailing,
relatedBy: .equal,
toItem: scrollView,
attribute: .trailing,
multiplier: 1,
constant: 0
)
photoViewBottomConstraint = NSLayoutConstraint(
item: photoView,
attribute: .bottom,
relatedBy: .equal,
toItem: scrollView,
attribute: .bottom,
multiplier: 1,
constant: 0
)
photoViewLeadingConstraint?.isActive = true
photoViewTopConstraint?.isActive = true
photoViewTrailingConstraint?.isActive = true
photoViewBottomConstraint?.isActive = true
}
init(photoName: String) {
self.photoName = photoName
super.init(nibName: nil, bundle: nil)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
extension PhotoViewController: UIScrollViewDelegate {
func viewForZooming(in scrollView: UIScrollView) -> UIView? {
photoView
}
func scrollViewDidZoom(_ scrollView: UIScrollView) {
updateConstraintsForSize(view.bounds.size)
}
func updateConstraintsForSize(_ size: CGSize) {
let yOffset = max(0, (size.height - photoView.frame.height) / 2)
photoViewTopConstraint?.constant = yOffset
photoViewBottomConstraint?.constant = yOffset
let xOffset = max(0, (size.width - photoView.frame.width) / 2)
photoViewLeadingConstraint?.constant = xOffset
photoViewTrailingConstraint?.constant = xOffset
view.layoutIfNeeded()
}
}
Hello,
We are seeing an intermittent crash when initializing a base UITableView with Apple's [initWithFrame:style:] initializer.
Crash stack:
Role: Foreground
OS Version: iOS 26.1
Exception Type: EXC_BREAKPOINT
Exception Subtype: KERN_INVALID_ADDRESS
EXC_BREAKPOINT:
0 libswiftCore.dylib +0x1358c0 _assertionFailure(_:_:file:line:flags:)
1 UIKitCore +0x1fdca0 0x188c26ca0 (0x188c26b20 + 384)
2 UIKitCore +0x1ffa60 0x188c28a60 (0x188c2890c + 340)
3 UIKitCore +0x2012d0 0x188c2a2d0 (0x188c2a1ec + 228)
4 UIKitCore +0x200f20 0x188c29f20 (0x188c29cac + 628)
5 UIKitCore +0x200428 0x188c29428 (0x188c29384 + 164)
6 UIKitCore +0x18af7f4 -[UITableMetricsAdapter _updateSharedSectionMetricsForListGeometry:]
7 UIKitCore +0x201da8 -[UITableMetricsAdapter tableBackgroundColor]
8 UIKitCore +0x1643a44 ___39-[UITableView _applyAppearanceDefaults]_block_invoke
9 UIKitCore +0x196f3d0 +[UIView _performSystemAppearanceModifications:]
10 UIKitCore +0x1643978 -[UITableView _applyAppearanceDefaults]
11 UIKitCore +0x202854 -[UITableView _setupTableViewCommon]
12 UIKitCore +0x1643760 -[UITableView initWithFrame:style:]
13 Application +0x30b6a40 closure #1 in variable initialization expression of MyAppClass.tableView
14 Application +0x30b6ef0 MyAppClass.init(frame:)
Has anyone else seen something like this?
Any insights or advice is much appreciated, thank you!
I am building an app for iOS and MacCatalyst that indexes files by storing their local paths. Because the app relies on the file remaining at its original location, I only want to accept items that can be opened in place.
I am struggling to determine if an item is "Open In Place" compatible early in the drag-and-drop lifecycle. Specifically:
In dropInteraction(_:canHandle:) and dropInteraction(_:sessionDidUpdate:), calling itemProvider.registeredTypeIdentifiers(fileOptions: [.openInPlace]) returns an empty array.
Only once the drop is actually committed in dropInteraction(_:performDrop:) does that same call return the expected type identifiers.
This creates a poor user experience. I want to validate the "In Place" capability at the very start of the session so the drop target only activates for valid files. If an item is ephemeral (like a dragged photo from the Photos app or a temporary export), the drop zone should not react at all.
How can I reliably detect if an NSItemProvider supports .openInPlace before the performDrop delegate method is called?
Topic:
App & System Services
SubTopic:
General
Tags:
Mac Catalyst
UIKit
Files and Storage
Foundation
Hi all,
I’m seeing a lifecycle behavior change on iOS 26.0 (and up).
While my app is in the foreground and active, pressing the hardware Lock button triggers didBecomeActive callbacks/notifications even though the app is transitioning away from active state.
I’m observing this sequence:
willResignActive
didBecomeActive
willResignActive
didEnterBackground
This happens for:
• UISceneDelegate.sceneDidBecomeActive(:)
• UIApplicationDelegate.applicationDidBecomeActive(:)
• UIApplication.didBecomeActiveNotification
On iOS 18 (same app, same code) I do not see didBecomeActive in the middle of locking/backgrounding.
Problem is reproduced on totally new project.
I would expect a normal transition to background:
• willResignActive → didEnterBackground
…and no extra didBecomeActive between them.
I have “became active” logic (refresh UI/state, resume timers, analytics). On iOS 26.0 this logic runs unexpectedly during locking, causing unnecessary work and incorrect state transitions.
Is this callback ordering expected on iOS 26.0 when pressing the Lock button?
If expected, what’s the recommended way to detect a “real” activation (and avoid transient didBecomeActive during locking/backgrounding)?
If this is a regression, is there a known workaround or best practice?
What works
let backButton = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
backButton.hidesSharedBackground = true
self.navigationItem.rightBarButtonItem = backButton
// or
self.navigationItem.leftBarButtonItem = backButton
What doesn't work
let backButton = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
backButton.hidesSharedBackground = true
self.navigationItem.backBarButtonItem = backButton
I've tried setting this property on all possible permutations and combinations e.g. Inside navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) and pushViewController(_ viewController: UIViewController, animated: Bool) of a custom UINavigationController to make sure.
Expected vs Actual behavior
Setting hidesSharedBackground = true should remove the glass background from both regular bar button items and back bar button items but it has no effect on backBarButtonItem.
Additional context
I’m aware of the UIDesignRequiresCompatibility Info.plist key, but I’m looking for a programmatic solution if there is one. The goal is to remove the glass background from back buttons.
My app start up has became horrid. It takes 1 minute to open SQLlite database for my rust core. Impossible to work...
I have Address Sanitizer, Thread Perf Checker and Thread Sanitizer disabled...
I just found a weird bug:
If you place a Text view using .foregroundStyle(.secondary), .tertiary, or other semantic colors inside a ScrollView, and apply a Material background clipped to an UnevenRoundedRectangle, the text becomes invisible. This issue does not occur when:
The text uses .primary or explicit colors (e.g., .red, Color.blue), or
The background is clipped to a standard shape (e.g., RoundedRectangle).
A minimal reproducible example is shown below:
ScrollView{
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello World.")
.font(.system(size: 15))
.foregroundStyle(.quinary)
}
}
.padding()
.frame(height: 100)
.background(Material.regular)
.clipShape(UnevenRoundedRectangle(topLeadingRadius: 10,bottomLeadingRadius: 8,bottomTrailingRadius:8, topTrailingRadius: 8))
I had take screenshots by following code
let scenes = UIApplication.shared.connectedScenes
let windowScene = scenes.first as? UIWindowScene
let window = windowScene?.windows.first
self.uiImage = window?.rootViewController?.view!.getImage(rect: rect)
View has two views. One is ImageView contains some image and overlay of image detection results with .overlay. another view is InfoView contains several info and button which above code fired. on iOS 17, I can take screenshots as I saw, but on iOS26, missing on image of ImageView. Overlay(detected rectangle) in Imageview and InfView can be taken.
How can I take screenshots as I saw on iOS26?(iPad)
I’ve notice that in Maps, some pins contain images and do not have the little triangle at the bottom of it, yet they still animate the same when clicked. How could this be achieved? I believe the name of this annotation is MKMapFeatureAnnotation.
I've tried this and it did not give the same result. I'm able to create a custom MKMarkerAnnotationView but it does not animate the same (balloon animation like the MKMapFeatureAnnotation). I was looking forward to create a custom MKMapFeatureAnnotation similar in design which would animate the same. Unfortunately, I cannot create a custom MKMapFeatureAnnotation because everything is privated
When using UITraitBridgedEnvironmentKey to pass a trait value to the swift environment, it causes a crash when trying to access the value from the environment.
The issue seems to be related to how swift uses the UITraitBridgedEnvironmentKey protocol since the crash occurs in swift::_getWitnessTable () from lazy protocol witness table accessor…. It can occur when calling any function that is generic using the UITraitBridgedEnvironmentKey type.
I originally encountered the issue when trying to use a UITraitBridgedEnvironmentKey in SwiftUI, but have been able to reproduce the issue with any function with a similar signature.
https://developer.apple.com/documentation/swiftui/environmentvalues/subscript(_:)-9zku
Steps to Reproduce
Requirements for the issue to occur
Project with a minimum iOS version of iOS 16
Build the project with Xcode 26
Run on iOS 18
Add the following code to a project and call foo(key: MyCustomTraitKey.self) from anywhere.
@available(iOS 17.0, *)
func foo<K>(key: K.Type) where K: UITraitBridgedEnvironmentKey {
// Crashes before this is called
}
@available(iOS 17.0, *)
public enum MyCustomTraitKey: UITraitBridgedEnvironmentKey {
public static let defaultValue: Bool = false
public static func read(from traitCollection: UITraitCollection) -> Bool { false }
public static func write(to mutableTraits: inout UIMutableTraits, value: Bool) {}
}
// The crash will occur when calling this. It can be added to a project anywhere
// The sample project calls it from scene(_:willConnectTo:options:)
foo(key: MyCustomTraitKey.self)
For example, I added it to the SceneDelegate in a UIKit Project
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
if #available(iOS 17, *) {
// The following line of code can be placed anywhere in a project, `SceneDelegate` is just a convenient place to put it to reproduce the issue.
foo(key: MyCustomTraitKey.self)
// ^ CRASH: Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)
}
}
}
Actual Behaviour
The app crashes with the stack trace showing the place calling foo but before foo is actually called. (ie, a breakpoint or print in foo is never hit)
#0 0x000000019595fbc4 in swift::_getWitnessTable ()
#1 0x0000000104954128 in lazy protocol witness table accessor for type MyCustomTraitKey and conformance MyCustomTraitKey ()
#2 0x0000000104953bc4 in SceneDelegate.scene(_:willConnectTo:options:) at .../SceneDelegate.swift:20
The app does not crash when run on iOS 17, or 26 or when the minimum ios version is raised to iOS 17 or higher.
It also doesn't crash on iOS 16 since it's not calling foo since UITraitBridgedEnvironmentKey was added in iOS 17.
Expected behaviour
The app should not crash. It should call foo on iOS 17, 18, and 26.
Our app supports UIScene. As a result, launchOptions in application(_:didFinishLaunchingWithOptions:) is always nil.
However, the documentation mentions that UIApplication.LaunchOptionsKey.location should be present when the app is launched due to a location event.
Given that our app is scene-based:
How can we reliably determine whether the app was launched due to a location update, geofence, or significant location change?
Is there a recommended pattern or API to detect this scenario in a Scene-based app lifecycle?
This information is critical for us to correctly initialize location-related logic on launch.
Relevant documentation:
https://developer.apple.com/documentation/corelocation/cllocationmanager/startmonitoringsignificantlocationchanges()
1. Summary
In a hybrid iOS app using WKWebView (Angular + Capacitor), after programmatically blurring an element and connecting a Bluetooth keyboard, pressing Ctrl+Home or Ctrl+End causes the app to crash.
The crash stack shows the issue occurs inside UIKit keyboard handling (UITextInteractionSelectableInputDelegate _moveToStartOfLine), indicating a system-level bug.
2. Steps to Reproduce
Open the hybrid app containing a WKWebView.
Blur the input (programmatically).
Connect a Bluetooth keyboard.
Press Ctrl + Home or Ctrl + End.
Expected result:
No crash. The command should be ignored if no text input is active.
Actual result:
App crashes immediately.
3. Crash Log (Crashlytics Trace)
Crashed: com.apple.main-thread
0 WebKit 0xfbdad0 <redacted> + 236
1 UIKitCore 0x10b0548 -[UITextInteractionSelectableInputDelegate _moveToStartOfLine:withHistory:] + 96
2 UIKitCore 0xd0fb38 -[UIKBInputDelegateManager _moveToStartOfLine:withHistory:] + 188
3 UIKitCore 0xa16174 __158-[_UIKeyboardStateManager handleMoveCursorToStartOfLine:beforePublicKeyCommands:testOnly:savedHistory:force:canHandleSelectableInputDelegateCommand:keyEvent:]_block_invoke + 52
4 UIKitCore 0xa36ae4 -[_UIKeyboardStateManager performBlockWithTextInputChangesIgnoredForNonMacOS:] + 48
5 UIKitCore 0xa160f0 -[_UIKeyboardStateManager handleMoveCursorToStartOfLine:beforePublicKeyCommands:testOnly:savedHistory:force:canHandleSelectableInputDelegateCommand:keyEvent:] + 440
6 UIKitCore 0xa06614 -[_UIKeyboardStateManager handleKeyCommand:repeatOkay:options:] + 3204
7 UIKitCore 0xa2fb64 -[_UIKeyboardStateManager _handleKeyCommandCommon:options:] + 76
8 UIKitCore 0xa2fb08 -[_UIKeyboardStateManager _handleKeyCommand:] + 20
9 UIKitCore 0xa30684 -[_UIKeyboardStateManager handleKeyEvent:executionContext:] + 2464
10 UIKitCore 0xa2f95c __42-[_UIKeyboardStateManager handleKeyEvent:]_block_invoke + 40
11 UIKitCore 0x4b9460 -[UIKeyboardTaskEntry execute:] + 208
12 UIKitCore 0x4b92f4 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 356
13 UIKitCore 0x4b8be0 -[UIKeyboardTaskQueue addTask:breadcrumb:] + 120
14 UIKitCore 0xa2f8d0 -[_UIKeyboardStateManager handleKeyEvent:] + 432
15 CoreFoundation 0x2f934 __invoking___ + 148
16 CoreFoundation 0x2efac -[NSInvocation invoke] + 424
17 UIKitCore 0x14cbcc4 -[UIRepeatedAction invoke] + 176
18 UIKitCore 0x14cbeb8 -[UIRepeatedAction _preInvocationTimerFire] + 56
19 UIKitCore 0x1195364 -[UIApplication _handleKeyboardPressEvent:] + 2192
20 UIKitCore 0x1187278 -[UIApplication pressesBegan:withEvent:] + 328
21 UIKitCore 0x9b808 forwardTouchMethod + 376
22 UIKitCore 0x9b808 forwardTouchMethod + 376
23 UIKitCore 0x9b808 forwardTouchMethod + 376
24 UIKitCore 0x9b808 forwardTouchMethod + 376
25 UIKitCore 0x9b808 forwardTouchMethod + 376
26 UIKitCore 0x9b808 forwardTouchMethod + 376
27 UIKitCore 0x9b808 forwardTouchMethod + 376
28 UIKitCore 0x9b808 forwardTouchMethod + 376
29 WebKit 0x66e2b4 <redacted> + 84
30 UIKitCore 0x9b808 forwardTouchMethod + 376
31 UIKitCore 0x157290c -[UIScrollView pressesBegan:withEvent:] + 148
32 UIKitCore 0x9b808 forwardTouchMethod + 376
33 WebKit 0xfbbd04 <redacted> + 100
34 UIKitCore 0x11a7620 -[UIWindow _sendButtonsForEvent:] + 312
35 UIKitCore 0x522dc -[UIWindow sendEvent:] + 568
36 UIKitCore 0x5f508 -[UIApplication sendEvent:] + 376
37 UIKitCore 0x1194364 -[UIApplication _handleKeyUIEvent:] + 136
38 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
39 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
40 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
41 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
42 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
43 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
44 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
45 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
46 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
47 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
48 UIKitCore 0x11943e8 -[UIApplication handleKeyUIEvent:] + 56
49 UIKitCore 0x11942ac -[UIApplication _handleKeyHIDEvent:usingSyntheticEvent:] + 660
50 UIKitCore 0x117ac __dispatchPreprocessedEventFromEventQueue + 4648
51 UIKitCore 0xfbe4 __processEventQueue + 4812
52 UIKitCore 0x94e4 updateCycleEntry + 160
53 UIKitCore 0x9404 _UIUpdateSequenceRun + 84
54 UIKitCore 0x8ab4 schedulerStepScheduledMainSection + 208
55 UIKitCore 0x41e4 runloopSourceCallback + 92
56 CoreFoundation 0xf92c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
57 CoreFoundation 0xf744 __CFRunLoopDoSource0 + 172
58 CoreFoundation 0xf5a0 __CFRunLoopDoSources0 + 232
59 CoreFoundation 0xff20 __CFRunLoopRun + 840
60 CoreFoundation 0x11adc CFRunLoopRunSpecific + 572
61 GraphicsServices 0x1454 GSEventRunModal + 168
62 UIKitCore 0x135274 -[UIApplication _run] + 816
63 UIKitCore 0x100a28 UIApplicationMain + 336
64 Order 0xa2ed0 main + 21 (AppDelegate.swift:21)
4. Environment
iPadOS versions: 18.1.0, 18.4.1, 18.6.2
WebView: WKWebView
Hybrid stack: Angular + (Capacitor)
Reproducible on multiple iPads and multiple iPadOS 18.x versions.
5. Expected Behavior
Pressing Ctrl+Home or Ctrl+End when no text input is active should be ignored and should not crash the app.
Hi there. I want to use Adobe XD for designing and prototyping apps, and I would like to get the UIKit design resources working. I downloaded it and tried to open it with Adobe XD, but it threw this error:
There was an error opening the file Apple iOS 26 UI Kit.sketch
(Error code: 115)
I really prefer to use the UIKit in Adobe XD rather than paying for Figma or Sketch. Thanks.
Apple Design Resources
In iOS 26, keyboardLayoutGuide does not provide the correct constraint when using third-party input method.
A demo’s source code is attached to FB18594298 to illustrate the issue.
The setup includes:
An inputAccessoryView above keyboard
An input box anchored to the top of the inputAccessoryView using the following constraint:
[self.view.keyboardLayoutGuide.topAnchor constraintEqualToAnchor:self.inputBoxContainerView.bottomAnchor]
Expected Behavior:
Before iOS 26, when keyboard toggled by clicking the input box, the input box should move above the inputAccessoryView.
Actual Behavior:
However, on iOS 26, when switching to a third-party IME (e.g. 百度输入法baidu,搜狗输入法sogou,微信输入法wechat), then click the input box, the input box is above the keyboard instead of the inputAccessoryView, and is covered by the inputAccessoryView.
I am struggling to change the tint of the back button in an UINavigationItem. In iOS 18.6 it looks like this
while on iOS 26 the same looks like this
I can live without the Dictionary but I'd like to get the blue color back.
In viewDidLoad() I have tried
navigationItem.backBarButtonItem?.tintColor = .link
but this did not work since navigationItem.backBarButtonItem is nil. My second attempt was
navigationController?.navigationBar.tintColor = .link
but this didn't work either.
I have even set the Global Tint to Link Color
but this had no effect either.
Does anyone have an idea how to change the tint of the back button in an UINavigationItem on iOS 26?