UIButton has a private _menuProvider property which gets called each time the button attempts to present its menu.
Handy for reusable components where the API client can vend their own UIMenu, or even just to present menus that are always up-to-date, regardless of state.
A public workaround is to use UIControl directly.
Set showsMenuAsPrimaryAction and isContextMenuInteractionEnabled to true, then implement the right delegate methods.
Looks like the new default behavior only applies to UIButton.
👉Example code: gist.github.com/vistar941/2d… (3/4)
Found an interesting UIKit rendering issue with a UIButton attached to UIMenu. The button’s appearance was still being managed manually with properties like layer.cornerRadius, tintColor, backgroundColor, and setImage.
This might be a mismatch between the implementation of UIKit’s prominent glass button configuration versus SwiftUI’s Button? SwiftUI.Button doesn’t actually use UIButton under the hood. UIButton definitely has the vibrant label effect applied- have tested this in my own app.
ALT I ran a small UI experiment comparing two styles:
A — Clean & Minimal: Elegant, simple, and distraction-free. Perfect for intuitive navigation and a professional, seamless user experience.
B — Vibrant & High-Contrast: Bold, colorful, and attention-grabbing. Designed to highlight key actions and drive immediate clicks.
Even small UI elements like buttons can significantly influence user behavior, engagement metrics, and overall product performance. Thoughtful button design isn’t just about aesthetics—it’s about creating an intuitive, conversion-focused, and enjoyable digital experience.
The IAS docs use a LocalScript also under StarterGui so the connection (to the cloned InputAction) is fresh after every character reset. You'll have to use ResetOnSpawn = false ScreenGui if you're writing code outside this paradigm and want the UIButton reference to be static.
Hey @SebJVidal , was having a hard time recreating this effect in UIKit, when setting a menu and showsMenuAsPrimaryAction to a UIButton the button morphs into the menu, and I couldn't find any API to disable that. Can you help?
Unfortunately there’s no way of doing this with UIButton. Photos is using a UIToolbar here which doesn’t use UIButtons but instead _UIButtonBarButton (which is a UIControl subclass). The animation is a result of calling setToolbarHidden(_:animated:). You’d have to roll your own button and animate a visual effect view’s effect and an image view’s blur radius.