I want to set a sublayer to a UIButton's layer, using a Glass or Prominent Glass configuration, setting the strokeColor property acting as the border to a UIButton's bounds.
The main issue I'm facing is not being able to follow the button's bounds when it changes as it expands on touch down.
Is there an expected pattern for applying sublayers to a UIButton and make it follow UIButton's bounds as it changes during interactions?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
On UIKit, shadows and borders are used laid out using CALayer properties. This works great when using .cornerRadius as this can be applied to the layers displaying borders/shadows.
With the addition of cornerConfiguration, which is done via UIView, what is the expected setup for making sure, for example, when a UIView is using a concentric behavior to its parent, that its shadows and borders are following the same corner radius for each side?
Would it be correct to read the corner radius values on the UIView's layoutSubviews method and then apply those to the border/shadow properties?
Starting on iOS 26 Beta 3, any UIVisualEffectView using a UIGlassEffect will have a default corner radius that cannot be modified by using UIVisualEffectView's layer.cornerRadius. This was working on Beta 1 and Beta 2.
On WWDC25 "Build a UIKit app with the new design", a UIVisualEffectView property called cornerConfiguration is used as example for changing the effect's corner radius, but this property does not seem to be available on any of the beta versions.
Is there any other way to update the UIGlassEffect corner radius on UIKit?
On WWDC25 session "Meet Liquid Glass", two Liquid Glass variants are mentioned: "regular" and "clear". "Regular" seems to be the default setting for UIGlassEffect, but I was not able to find an option for clear.
Is there a native element that uses clear? Is it coming to later betas for iOS 26?
When exporting an icon using Icon Composer Beta for macOS 26, a light, dark and tinted versions for macOS are created, but I was not able to find how to use them on the Xcode Project. I also tried finding something pointing to that on documentation, but I was not able to find anything.
I see that system apps have light, dark and tinted versions on the first beta of macOS 26, which leads me to believe it would be possible for third-party apps to do that same.
Using an App Clip link encoded into a QR Code shows an error when scanning the encoded QR Code on an iPhone or iPad.
After being scanned, the App Clip's banner is visible, but a message says: "App Clip Unavailable".
Accessing the same App Clip URL via Safari works as expected.
I've filed a feedback with more details and screenshots of the issue here: FB17891015
Thanks!
New versions of AppKit/Mac Catalyst apps that use Google's Sign In framework are being rejected by App Store Review for the past two weeks.
Reason shared was:
The user is taken to the default web browser to sign in or register for an account, which provides a poor user experience.
And also citing: Data Collection & Storage guidelines -> https://developer.apple.com/app-store/review/guidelines/#data-collection-and-storage
Opening macOS' default web browser has been a native behavior of Mac apps when using SFSafariViewController with ASWebAuthenticationSession, which is required, since iOS 13, for securely/privately logging in users.
As far as I could investigate, there hasn't been any updates to the guidelines that would indicate any required changes to developers in regards to how login works for macOS apps.
Are there any steps developers need to take to get updates approved while still providing users with Google's Sign in?
As reference, there is an on-going discussion on GoogleSignIn repo about this issue affecting multiple developers and apps:
https://github.com/google/GoogleSignIn-iOS/issues/388
After popping up a NSMenu a few times, NSResponder's mouseExited event is called even when the cursor is inside the tracking area, returning the main app window's max X value, which makes the mouseEntered/Exited methods unusable for tracking whether or not cursor is currently inside the view's frame.
Steps
Create a NSMenuItem with a custom view inside
Add a tracking area to the views frame
Add a background color that changes on mouseEntered/Exited
Open and close NSMenu a few times until the color starts flickering when moving the cursor inside the view's frame
If possible, print out NSEvent's locationInWindow on both mouseEntered and Exited and see that the location for exited method is not being reported correctly, while the flickering from the bg color being set is happening.
Expected Result
mouseExited should only be called the cursor leaves the tracking area. locationInWindow values should not exceed the NSPopUpWindow's frame.
Tested on
macOS Sonoma 14.3.1 and 14.4.1; Xcode 15.2;
Feedback ID
https://feedbackassistant.apple.com/feedback/13698735
Using NSMenuItem's delegate method menu(_ menu: NSMenu, willHighlight item: NSMenuItem?) should return a nil item when the mouse location is moved out of the NSMenu window or if any of the items should not be highlighted. As per Apple Developer website:
Only one item per menu can be highlighted at a time. If item is nil, it means that all items in the menu are about to be unhighlighted.
But, on macOS Sonoma, when moving the mouse over a .sectionHeader and/or a Separator item, willHighlight won't be called, which makes it not return any item (neither nil, nor the section header).
This behavior makes it impossible to use willHighlight method to determine whether custom views should be highlighted or not.
Is this a bug or expected behavior?
On a submenu (NSMenu), items that use custom views as part of their layout, do not call NSMenu's delegate willHighlight method. The method is called correctly when placing the same items with custom views inside the root/parent NSMenu.
Steps
Create a NSMenu with at least two NSMenuItem; One with a custom view and another without it.
Add a submenu to the item without a custom view; make sure to set the submenu's delegate
Add multiple items to the submenu; Make sure some of the items are using custom views
Using one of NSMenu's delegate method, willHighlight, check if it will return an item when hovering over the custom view items inside the submenu
Notice it will only return when hovering over items that do not use a custom view.
Expected Result
NSMenu's willHighlight method should be called and inform with item with custom view should be highlighted inside the submenu.
Tests done on macOS 14.3.1 and 14.4.1. Xcode 15.2 and 15.3.
Specs: macOS Sonoma 14.3.1
Using NSMenu's submenus with a list of NSMenuItems (with or without custom views) will produce a hang for the first time they are presented. The larger the list, the more time the UI will be frozen before presenting the submenu.
Is there something that can be done to mitigate this behavior?
Running a Process executableURL path for a Catalyst target using a macOS type bundle returns the following error as output:
(/Applications/Xcode-15.1.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Debugger/libViewDebuggerSupport_macCatalyst.dylib), but incompatible platform (have \'MacCatalyst\', need \'macOS\'))
Is it possible to set which dylib platform is used by the macOS bundle executable file instead of using the MacCatalyst one?
Hi,
I'm working on a View Controller where the Navigation Controller's UIBarButtonItems, composed of SF Symbol images and/or System Items, should change their tint color based on the current Navigation Controller scroll edge or default appearance.
let buttonAppearance: UIBarButtonItemAppearance = .init(style: .plain)
buttonAppearance.normal.titleTextAttributes = [.foregroundColor: color]
standardAppearance.buttonAppearance = buttonAppearance
I've used UIBarButtonItemAppearance titleTextAttributes to successfully change a UIButton's label text color, but I wasn't able to find a supported method under the UIAppearance API to do the same update to images.
I'd highly appreciate clarification on whether or not it is supported and, if not, what could be some alternatives.
Specs: iOS 16+
Thanks!
Is it possible to turn on Stage Manager on Xcode's iPadOS simulator?