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

Posts under UIKit tag

200 Posts

Post

Replies

Boosts

Views

Activity

How to update action extension icon for iOS 26
iOS 26 seems to have changed the way action extension icons appear in the share sheet. My icon is too small now compared to the Copy button in Safari (and Shortcuts’ icons are too small too, a bug?). How do you update it, and how do you ensure it looks fine in iOS 18 and earlier? My current icon is an AppIcon in the asset catalog, single size 1024x1024, with about 130px padding around it.
0
0
115
Jul ’25
Custom view controller transitions breaks liquid glass morphs
I'm using UIViewControllerAnimatedTransitioning to customize my view controllers transitions. When I push a viewcontroller on my navigation stack I need to have a fade in/out instead of the standard right-to-left transition. But having this code appears to break the liquid glass nav-bar buttons morphing from one screen to another. Is there a way to keep these nice morphing and still have the a custom view controller transitions?
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
84
Jul ’25
iOS: Dictation case change with custom keyboard
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.
3
0
258
Jul ’25
Double border in UIBarButtonItem with Custom View on iOS 26, bug or feature?
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.
2
0
246
Jul ’25
UITab text color in dark mode
When running my app in dark mode in iOS 26 beta 3 the text color for inactive tabs are dark while the icon is light. I have reported this as a bug (FB18744184) but wanted to check if someone have found a workaround for this issue? I didn't see it mentioned in the release notes.
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
118
Jul ’25
Regarding Launch Screens
When building an app with iOS26 beta3, I received a warning saying "Launch screens will soon be required." Does this mean that, similar to the thread below, the app might not launch in builds for iOS27 and later (including iOS27)? https://developer.apple.com/forums/thread/789004
1
0
131
Jul ’25
Why my CADisplayLink runs at low framerate, but UIScrollView doesn't?
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/>
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
164
Jul ’25
Label I Added in Storyboard Appears nil when I try to Dequeue a Cell Using a Data Source Cell Provider
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) } }
Topic: UI Frameworks SubTopic: UIKit Tags:
9
0
132
Jul ’25
UIScrollEdgeElementContainerInteraction crashed on iOS 26 Beta 3
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
Topic: UI Frameworks SubTopic: UIKit Tags:
2
3
186
Jul ’25
iOS 26: keyboardLayoutGuide does not give the correct constraint
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.
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
258
Jul ’25
The Liquid glass blur effect does not show over the UITabBar as content scrolls underneath.
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) ]) }
1
0
274
Jul ’25
The async/await API crashes in Xcode 16.3 and later
We use several UIKit and AVFoundation APIs in our project, including: setAlternateIconName(_:completionHandler:) getAllTasks(completionHandler:) loadMediaSelectionGroup(for:completionHandler:) Moreover, we use the Swift Concurrency versions for these APIs: @MainActor func setAlternateIconName(_ alternateIconName: String?) async throws var allTasks: [URLSessionTask] { get async } func loadMediaSelectionGroup(for mediaCharacteristic: AVMediaCharacteristic) async throws -> AVMediaSelectionGroup? Everything worked well with these APIs in Xcode 16.2 and earlier, but starting from Xcode 16.3 (and in 16.4), they cause crashes. We've rewritten the APIs to use completion blocks instead of async/await, and this approach works. Stack traces: setAlternateIconName(_:completionHandler:) var allTasks: [URLSessionTask] { get async } loadMediaSelectionGroup(for:completionHandler:) Also, I attached some screenshots from Xcode 16.4.
6
0
330
Jul ’25
Is the new iPadOS/macOS 26 help icon available in SF Symbols?
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?
2
0
177
Jul ’25
Using GlassEffectContainer with UIKit
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!
Topic: UI Frameworks SubTopic: UIKit Tags:
2
1
357
Jul ’25
UIDefines.h breaking tvOS on 26 in Tahoe
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)?
2
1
561
Jul ’25
hidesBottomBarWhenPushed does not work on iOS 26
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.
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
173
Jul ’25