I have several UIBarButtonItems in a navigation bar, and they get the default glass treatment in iOS26. All look ok excepting one, which is a UIBarButtonItem with a custom view, a plain UIButton. This one does not change the tint of the inner button's image to white/black like all the others, but it stays blue, like the regular tinted bar buttons pre iOS26.
I then built the inner UIButton starting from glass configuration, UIButton.Configuration.glass(), and it looks fine, see the 2nd pic. But if I send the app to background and bring it back, the inner button gets a border, such that the bar button now has 2 borders, and look out of place compared to the other bar buttons, see 3rd pic.
Is this a bug or a feature? How can I make custom-view bar buttons look like regular ones, without double border.
UIKit
RSS for tagConstruct and manage graphical, event-driven user interfaces for iOS or tvOS apps using UIKit.
Posts under UIKit tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
after i updated to iOS 26.0 Beta3, UIScrollEdgeElementContainerInteraction crashed:
let scrollInteraction = UIScrollEdgeElementContainerInteraction()
scrollInteraction.edge = .bottom
scrollInteraction.scrollView = webView?.scrollView
bottomBar.addInteraction(scrollInteraction)
i got this crash info:unrecognized selector sent to instance: UIScrollEdgeElementContainerInteraction setEdge: and UIScrollEdgeElementContainerInteraction setScrollView
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 have a tiny iOS app project set up.
I instantiate a CADisplayLink and then log the time that passes between its calls to target-action. This is on an iPhone 15 Pro, so 120 hertz. However, I am observing that in user space, the actual tick rate of my target-action being called is actually fluctuating around 70-80 hertz.
But then, I instantiate a UIScrollView and give it a delegate. In the delegate I am observing that scrollViewDidScroll gets called with the correct 120 hz. And if I set a breakpoint inside scrollViewDidScroll, I can see that this is called from a CADisplayLink handler inside UIScrollView. How comes they can have 120hz, and I don't?
Of course, I did set UIScreen.maximumFramesPerSecond to preferredFramerateRange, minimum, maximum and preferred.
Also, I don no virtually no work in the handler - I am just setting UIView.transform = CGAffineTransform(translationY: 100).
Also, my info.plist does indeed contain <key>CADisableMinimumFrameDurationOnPhone</key><true/>
I have added a UICollectionViewCell to my storyboard, and I added a UILabel to my UICollectionViewCell in storyboard. I have created a cell registration using UICollectionView.CellRegistration and have implemented the cellProvider closure for the datasource which dequeue a collection view cell of type TapLabelCollectionViewCell(I have subclassed the cell in my storyboard to this class).
In my TapLabelCollectionViewCell, I am trying to set the tap gesture recogniser on the label, but the label appears nil, which I've connected using an @IBOutlet. Why is this and how can I fix it?
My code :
// UI View Controller:
class TapGridViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
tapGridCollectionView.collectionViewLayout = createLayout()
configureDataSource()
applySnapshot()
}
func configureDataSource() {
let cellRegistration = UICollectionView.CellRegistration<TapLabelCollectionViewCell, CellItem>(handler: {
(cell: TapLabelCollectionViewCell, indexPath: IndexPath, item: CellItem) in
cell.taplabel.text = String(item.labelCount)
})
dataSource = UICollectionViewDiffableDataSource(collectionView: tapGridCollectionView, cellProvider: { (collectionView: UICollectionView, indexPath: IndexPath, item: CellItem) in
let cell = collectionView.dequeueConfiguredReusableCell(using: cellRegistration, for: indexPath, item: item)
cell.delegate = self
cell.index = indexPath.row
return cell
})
}
}
// UI Collection View Cell:
protocol TapLabelCollectionViewCellDelegate: AnyObject {
func incrementNumberOfTaps(index: Int)
}
class TapLabelCollectionViewCell: UICollectionViewCell {
@IBOutlet var taplabel: UILabel!
var delegate: TapLabelCollectionViewCellDelegate?
var index: Int!
static let identifier = "tapLabelCellIdentifier"
override init(frame: CGRect) {
super.init(frame: frame)
setUpTapGestureRecognizer()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
func setUpTapGestureRecognizer() {
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(incrementNumberOfTaps))
print("tap Label,", taplabel)
taplabel.addGestureRecognizer(tapGestureRecognizer)
}
@objc func incrementNumberOfTaps() {
delegate?.incrementNumberOfTaps(index: index)
}
}
I connected a tap gesture recogniser to a label in storyboard by dragging a tap gesture recogniser object onto the label. When I connect the outlet to the gesture recogniser I get this error:
How can I connect the tap gesture recogniser in storyboard to my code?
I implement a custom keyboard extension. On modern iPhones the dictation button will display in the lower right even when a custom keyboard is active. If you are in an empty text field with the sentence capitalization trait turned on (e.g., Messages), press the Mic button, and dictate something, it will appear with the first word capitalized. As it should. But when you hit the Mic button again to accept the result, the first word is suddenly changed to uncapitalized. With the system keyboard this final case change does not occur.
Why? How to prevent this?
More technical detail: I receive UITextInputDelegate-textWillChange and UITextInputDelegate-textDidChange events during dictation (always with the textInput parameter set to nil) and then a final textDidChange with the lowercased text when accepting at the end.
I have a couple of (older) UIKit-based Apps using UISplitViewController on the iPad to have a two-column layout. I'm trying to edit the App so it will shows the left column as sidebar with liquid glass effect, similar to the one in the "Settings" App of iPadOS 26. But this seems to be almost impossible to do right now.
"out of the box" the UISplitViewController already shows the left column somehow like a sidebar, with some margins to the sides, but missing the glass effect and with very little contrast to the background. If the left column contains a UITableViewController, I can try to get the glass effect this way within the UITableViewController:
tableView.backgroundColor = .clear
tableView.backgroundView = UIVisualEffectView(effect: UIGlassContainerEffect())
It is necessary to set the backgroundColor of the table view to the clear color because otherwise the default background color would completely cover the glass effect and so it's no longer visible.
It is also necessary to set the background of all UITableViewCells to clear.
If the window is in the foreground, this will now look very similar to the sidebar of the Settings App.
However if the window is in the back, the sidebar is now much darker than the one of the Settings App. Not that nice looking, but for now acceptable.
However whenever I navigate to another view controller in the side bar, all the clear backgrounds destroy the great look, because the transition to the new child controller overlaps with the old parent controller and you see both at the same time (because of the clear backgrounds).
What is the best way to solve these issues and get a sidebar looking like the one of the Settings App under all conditions?
In iOS26, when using a standalone UITabBar without UITabBarController, the liquid glass blur effect is not applied when scrollable content moves behind the tab bar. However, the blur effect appears correctly when using UITabBarController.
Sample Screenshots:
When using UITababr
When using UITababrController
Sample Code:
class SimpleTabBarController: UIViewController, UITabBarDelegate {
let tabBar = UITabBar()
let redItem = UITabBarItem(title: "Red", image: .add, tag: 0)
let blueItem = UITabBarItem(title: "Blue", image: .checkmark, tag: 1)
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
tabBar.items = [redItem, blueItem]
tabBar.selectedItem = redItem
tabBar.delegate = self
tabBar.translatesAutoresizingMaskIntoConstraints = false
let tableContainerView = TableContainerView()
view.addSubview(tableContainerView)
tableContainerView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
tableContainerView.topAnchor.constraint(equalTo: view.topAnchor),
tableContainerView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
tableContainerView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
tableContainerView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
])
view.addSubview(tabBar)
NSLayoutConstraint.activate([
tabBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
tabBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
tabBar.bottomAnchor.constraint(equalTo: view.bottomAnchor)
])
}
I'm working on a UIKit-based iOS app and would like to use the new GlassEffectContainer with liquid glass
effects introduced in iOS 26 beta.
Currently, I have two buttons (heart and comment) in a UIToolbar and want to wrap them in a glass effect container to get the morphing/blending effect when they're close together.
The API appears to be SwiftUI-only:
GlassEffectContainer
.glassEffect() modifier
Is there a UIKit equivalent, or is the recommended approach to embed a SwiftUI view using UIHostingController?
I'm already using UIVisualEffectView with UIGlassEffect elsewhere, but that doesn't provide the liquid morphing behavior between multiple views.
From, "Applying liquid glass" article:
GlassEffectContainer(spacing: 40.0) {
HStack(spacing: 40.0) {
Image(systemName: "scribble.variable")
.frame(width: 80.0, height: 80.0)
.font(.system(size: 36))
.glassEffect()
Image(systemName: "eraser.fill")
.frame(width: 80.0, height: 80.0)
.font(.system(size: 36))
.glassEffect()
// An `offset` shows how Liquid Glass effects react to each other in a container.
// Use animations and components appearing and disappearing to obtain effects that look purposeful.
.offset(x: -40.0, y: 0.0)
}
}
Thanks!
Hi,
There is new cornerConfiguration API introduced for UIVisualEffectView mentioned in tutorial below.
https://developer.apple.com/videos/play/wwdc2025/284/
But it is not available to use as of now. Using Xcode 26 Beta 2.
Please get it fixed.
My app encountered a crash problem. The analysis stack seems to be related to the keyboard. The system keyboard code is unresponsive for a long time until it crash. The feature of the stack, BrowserEngineKit, seems to indicate the webview scene. Xcode debugging found that tap the input box on the webview page can reproduce the same stack as the crash, but the crash cannot be reproduced. I noticed a feedback link https://developer.apple.com/forums/thread/784718, which is the same as the top of the crash stack I encountered, so the root cause of the problem may be similar, caused by the locking operation related to UIKeyboardTaskQueue. Hope to give some suggestions. Thanks.
crash log:
Incident Identifier: 39E3AFE6-43B1-4DE6-AC2B-D62C5EC89752
CrashReporter Key: AppleMetricKit
Hardware Model: iPhone17,2
Process: iAliexpress
Code Type: ARM-64
Parent Process: ? [1]
Date/Time: 2025-07-02 22:59:00
Launch Time: Unknown
OS Version: iPhone OS 18.1.1 (22B91)
Report Version: 104
Exception Type: EXC_CRASH
Exception Codes: KERN_SUCCESS
Triggered by Thread: 0
Application Specific Information:
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: app<com.alibaba.iAliexpress(A182346C-2A09-4082-9AAE-0EC7A1A1B5AB)>:2263 exhausted real (wall clock) time allowance of 10.00 seconds
ProcessVisibility: Unknown
ProcessState: Running
WatchdogEvent: scene-update
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 15.280 (user 9.430, system 5.850), 25% CPU",
"Elapsed application CPU time (seconds): 0.210, 0% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001ea7f7f90 __psynch_cvwait :8 (in libsystem_kernel.dylib)
1 libsystem_pthread.dylib 0x000000022296aa7c _pthread_cond_wait :1248 (in libsystem_pthread.dylib)
2 Foundation 0x000000019908fa9c -[NSCondition waitUntilDate:] :132 (in Foundation)
3 Foundation 0x000000019908bea8 -[NSConditionLock lockWhenCondition:beforeDate:] :80 (in Foundation)
4 UIKitCore 0x000000019d05cbb4 -[UIKeyboardTaskQueue lockWhenReadyForMainThread] :784 (in UIKitCore)
5 UIKitCore 0x000000019d05c85c -[UIKeyboardTaskQueue waitUntilAllTasksAreFinished] :160 (in UIKitCore)
6 UIKitCore 0x000000019d56720c -[_UIKeyboardStateManager prepareForSelectionChange] :128 (in UIKitCore)
7 UIKitCore 0x000000019d5674f4 -[_UIKeyboardStateManager selectionWillChange:] :72 (in UIKitCore)
8 BrowserEngineKit 0x0000000257671688 -[BETextInteraction selectionWillChange:] :84 (in BrowserEngineKit)
9 UIKitCore 0x000000019d75d654 -[UIAsyncTextInteraction selectionWillChange:] :68 (in UIKitCore)
10 UIKitCore 0x000000019dbae374 -[_UIKeyboardTextSelectionController beginSelectionChange] :64 (in UIKitCore)
11 UIKitCore 0x000000019df5fed0 -[UITextSelectionInteraction tappedToPositionCursorWithGesture:atPoint:granularity:completionHandler:] :476 (in UIKitCore)
12 UIKitCore 0x000000019df5f948 -[UITextSelectionInteraction _checkForRepeatedTap:gestureLocationOut:] :1072 (in UIKitCore)
13 UIKitCore 0x000000019df60488 -[UITextSelectionInteraction _handleMultiTapGesture:] :852 (in UIKitCore)
14 UIKitCore 0x000000019cf879cc -[UIApplication sendAction:to:from:forEvent:] :100 (in UIKitCore)
15 UIKitCore 0x000000019d84ce98 -[UITextMultiTapRecognizer onStateUpdate:] :280 (in UIKitCore)
16 UIKitCore 0x000000019cfb6ac4 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] :128 (in UIKitCore)
17 UIKitCore 0x000000019cfb6934 _UIGestureRecognizerSendTargetActions :92 (in UIKitCore)
18 UIKitCore 0x000000019cfb66f4 _UIGestureRecognizerSendActions :284 (in UIKitCore)
19 UIKitCore 0x000000019cc69b28 -[UIGestureRecognizer _updateGestureForActiveEvents] :572 (in UIKitCore)
20 UIKitCore 0x000000019cc3b724 _UIGestureEnvironmentUpdate :2488 (in UIKitCore)
21 UIKitCore 0x000000019cd2fa00 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] :336 (in UIKitCore)
22 UIKitCore 0x000000019cecffe4 -[UIGestureEnvironment _updateForEvent:window:] :188 (in UIKitCore)
23 UIKitCore 0x000000019cecf3c8 -[UIWindow sendEvent:] :2948 (in UIKitCore)
24 iAliexpress 0x0000000104e92000 -[UIWindow(AliHA) aliHASwizzledSendEvent:] UIWindow+AliHA.m:18 (in iAliexpress)
25 UIKitCore 0x000000019cd63b70 -[UIApplication sendEvent:] :376 (in UIKitCore)
26 iAliexpress 0x0000000104e91c84 -[UIApplication(SPM) alg_sendEvent:] AFSPMManager.m:0 (in iAliexpress)
27 UIKitCore 0x000000019cd6409c __dispatchPreprocessedEventFromEventQueue :1048 (in UIKitCore)
28 UIKitCore 0x000000019cd6df3c __processEventQueue :5696 (in UIKitCore)
29 UIKitCore 0x000000019cc66c60 updateCycleEntry :160 (in UIKitCore)
30 UIKitCore 0x000000019cc649d8 _UIUpdateSequenceRun :84 (in UIKitCore)
31 UIKitCore 0x000000019cc64628 schedulerStepScheduledMainSection :172 (in UIKitCore)
32 UIKitCore 0x000000019cc6559c runloopSourceCallback :92 (in UIKitCore)
33 CoreFoundation 0x000000019a434328 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ :28 (in CoreFoundation)
34 CoreFoundation 0x000000019a4342bc __CFRunLoopDoSource0 :176 (in CoreFoundation)
35 CoreFoundation 0x000000019a431dc0 __CFRunLoopDoSources0 :244 (in CoreFoundation)
36 CoreFoundation 0x000000019a430fbc __CFRunLoopRun :840 (in CoreFoundation)
37 CoreFoundation 0x000000019a430830 CFRunLoopRunSpecific :588 (in CoreFoundation)
38 GraphicsServices 0x00000001e64101c4 GSEventRunModal :164 (in GraphicsServices)
39 UIKitCore 0x000000019cf96eb0 -[UIApplication _run] :816 (in UIKitCore)
40 UIKitCore 0x000000019d0455b4 UIApplicationMain :340 (in UIKitCore)
41 iAliexpress 0x0000000104e9b0b8 _main main.m:17 (in iAliexpress)
42 dyld 0x00000001bfe1eec8 start :2724 (in dyld)
Under macOS 26 and iPadOS, the Help menu in many cases has a menu item for "App Help". This item has the following icon:
I need to use this in my own app. I am unable to find this icon in SF Symbols 7 beta. I've scanned all of the icons under "What's New". I've searched for "help", "light", and "bulb" and this icon does not appear.
Does anyone know if it's even a new SF Symbol? Or does anyone know of a way to use this icon?
We have an app that optionally includes UIKit, and in Xcode 16.3 it builds just fine, but with Xcode 26 it fails because it cannot find UIDefines.h.
Error:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS26.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:10:9: fatal error: 'UIUtilities/UIDefines.h' file not found
I looked for it, and inside of Xcode 26 there is a new folder(SubFrameworks) inside of the TV Simulator that does not exist in 18 and it only has one thing in that folder and it's UIUtilities.framework.
Reference path: /Applications/Xcode-beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/System/Library/SubFrameworks/UIUtilities.framework/
Not sure how to get around this except to put in a bunch of new ifdefines maybe to deal with it, but it is weird that the subframeworks file is part of the issue. Anyone have any ideas besides copying the files over (doesn't work anyway)?
We are seeing crashes in Xcode organizer. So far we are not able to reproduce them locally. They affect multiple app releases (some older, built with Xcode 15.x and newer built with Xcode 16.0). They only affect iOS 18.5.
Is there anything that changed in latest iOS? It's hard to tell what exactly is causing this crash because setting symbolic breakpoint on CA::Render::Image::new_image(unsigned int, unsigned int, unsigned int, unsigned int, CGColorSpace*, void const*, unsigned long const*, void (*)(void const*, void*), void*) triggers this breakpoint all the time, but not necessarily with exactly the previous stack frames matching the crash report.
Is it a known issue?
crash.crash
Thank you.
How do you create a toolbar item using the standard system close button or prominent done (✔️) button in SwiftUI?
In UIKit UIBarButtonItem provides .close and .done system items, and to get the tinted checkmark for done you set style = .prominent.
Since iOS 26, hidesBottomBarWhenPushed no longer works.
We have numerous screens in our app which depend on being able to extend content to the bottom of the screen, and this feels like a bug.
Consider this example, running the exact same code across iOS 18 and iOS 26. On iOS 18, pushing the button pushes a view controller and the tab bar disappears, on iOS 26, however, pushing the view controller does not hide the tab bar.
I've filed this as FB18543961 and attached the sample project.
In iOS 26 there is a new way of displaying action sheets from the buttons that triggers them. I figured out that in SwiftUI you can just set the confirmationDialog view modifier on the button that triggers it.
However, I can't find a way to get this behavior in UIKit when a UIButton triggers an alert. Has anyone got this work?
The behavior is mentioned briefly in the "Get to know the new design system" session.
In iPadOS 26, Apple introduced macOS-style window control buttons (close, minimize, fullscreen) for iPad apps running in a floating window. I'm working on a custom toolbar (UIView) positioned near the top of the window, and I'd like to avoid overlapping with these new controls.
However, I haven't found any public API that exposes the frame, layout margins, or safe area insets related to this new UI region. I've checked the window's safeAreaInsets, additionalSafeAreaInsets, and UIWindowSceneDelegate APIs, but none of them seem to reflect the area occupied by these buttons.
Is there an officially supported way to:
Get the layout information (frame, insets, or margins) of the window control buttons on iPadOS 26?
Or, is there a system-defined guideline or padding value we should use to avoid overlapping this new UI?
Any clarification or guidance would be appreciated!
I have a game app for iOS and iPadOS, which expects a full screen experience. I'd like to out of window resizing in iPadOS 26 as it negatively impacts the UI/UX of the app. I have UIRequiresFullScreen defined, but it doesn't seem to actually force full screen on iPadOS 26 anymore.