Post

Replies

Boosts

Views

Activity

Reply to Setting Tint Color for Prominent Style UIBarButtonItems at App Level in iOS26
Another beta release and another round of disappointment. Not a single tint/color related issue was fixed in the beta 5. Two months of beta testing and Apple seems to want all of us to deliver purely black and white user interfaces. That or they are abandoning UIKit. I have a dozen open iOS 26 UIKit bugs. Many since beta 1. All include trivial sample apps that demonstrate the issue. And I’m talking about flat out broken behavior, not just things I wish were different. So frustrating.
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’25
Reply to Is there a tech note for menuBuilder?
There’s a sample app you can refer to. Look at the documentation for UIMenuBuilder. The overview has a link to the “Adding menus and shortcuts to the menu bar and user interface” sample app. In short, the menu walks the responder chain to find the responder that handles the selector. This means the active window and its view hierarchy will be looked at to handle the menu. If your window’s rootViewController is where you handle the menu‘s selector then that controller should know its own document to handle. In my own app my main root view controller class handles most menu items. This makes it easy for a given window to handle and validate the menu. The app delegate is only used to handle and validate menu items that are not window specific.
Topic: UI Frameworks SubTopic: UIKit
Aug ’25
Reply to Is there a tech note for menuBuilder?
My menu code is all in Objective-C too (old app still going). I've been using UIMenuBuilder since iOS 14 in support of macOS via Mac Catalyst. My proposed solution also works now on the iPad in iOS 26. Your case is slightly more complicated than mine. I support multiple scenes but all of the scenes are the same class with the same root view controller class. First, design your overall app menu taking into account the needs of general app-level menu items and items specific to each of your scenes' root view controllers. In the end you will have common menu items used by all scenes, you will have items specific to each scene, and you will have items that work even if there are no open scenes. Once you know all of the possible menu items, you will use UIMenuBuilder in the app delegate to build the entire possible menu structure. Then there will be validation code in the app delegate and each of your possible root view controllers. Each root view controller will only validate the items it can handle. For those it can't it calls super. And the app delegate handles what it can and for those it can't it disables them. With that general approach, if Scene A is in focus, then it validates its own specific menu item and punts to the app delegate for the rest. The app delegate will handle a few and disable the rest. This means that while Scene A is in focus, any menu items specific to Scene B will be disabled (in the app delegate by default). Here's some example skeleton code: In AppDelegate.m: - (void)buildMenuWithBuilder:(id<UIMenuBuilder>)builder { [super buildMenuWithBuilder:builder]; if (builder.system != UIMenuSystem.mainSystem) { return; } // Remove unwanted standard File menu: [builder removeMenuForIdentifier:UIMenuOpenRecent]; [builder removeMenuForIdentifier:UIMenuOpen]; [builder removeMenuForIdentifier:UIMenuDocument]; // Add some new File menu items UICommand *item1 = [UIKeyCommand commandWithTitle:@"Item 1" image:[UIImage systemImageNamed:@"some.symbol"] action:@selector(item1MenuAction:) input:@"I" modifierFlags:UIKeyModifierShift | UIKeyModifierCommand propertyList:nil]; UICommand *item2 = [UIKeyCommand commandWithTitle:@"Item 2" image:[UIImage systemImageNamed:@"other.symbol"] action:@selector(item2MenuAction:) input:@"J" modifierFlags:UIKeyModifierShift | UIKeyModifierCommand propertyList:nil]; UIMenu *extraItems = [UIMenu menuWithTitle:@"" image: nil identifier:nil options:UIMenuOptionsDisplayInline children:@[ item1, item2 ]]; // NO_I18N [builder insertSiblingMenu:extraItems afterMenuForIdentifier:UIMenuClose]; // Build everything else as needed } - (void)validateCommand:(UICommand *)command { // Handle App level items here if ( command.action == @selector(someMenuAction:) || command.action == @selector(otherMenuAction:) || NO) { command.attributes &= ~UIMenuElementAttributesDisabled; // Always on } else if ( command.action == @selector(anotherMenuAction:) || NO) { if (someCondition) { command.attributes &= ~UIMenuElementAttributesDisabled; } else { command.attributes |= UIMenuElementAttributesDisabled; } } else { [super validateCommand:command]; } } Now add a validateCommand: to each of your root view controller classes. It should validate each of its own commands as needed. Call super for all other commands. Tedious but straight forward.
Topic: UI Frameworks SubTopic: UIKit
Aug ’25
Reply to UISearchController scope buttons disappear forever after dismissing search when embedded in a search tab
I filed two related UISearchBar scope button bug reports against beta 1. Still not fixed as of beta 5. Though earlier today I found a work around that might work in your case too. Set the search controller scopeBarActivation to .manual. Set the controller’s delegate. In the didPresentSearchController delegate method, call setShowScope(true, animated: true) on the search bar. In the willDismissSearchController delegate method, call setShowScope(false, animated: true) on the search bar. The latter one is key. The result looks slightly clunky but at least the scope buttons appear more than once.
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’25
Reply to iOS 26 Beta 6 in Simulator
Presumably Xcode 26 beta 6 will be released next Tuesday and that should support iOS 26 beta 6. It’s unusual that Apple released iOS 26 beta 6 only a week after beta 5 and likely a week before Xcode 26 beta 6 comes out. In short, no there is no iOS 26 beta 6 simulator yet.
Aug ’25
Reply to Is there a tech note for menuBuilder?
I looked into migrating some of my existing validateCommand: code into canPerformAction:sender: and I hit a roadblock. In one of my cases I use the same selector for a whole set of menus. I use the command’s propertyList value to act accordingly. This is fine in validateCommand: since I have access to the command. But in canPerformAction:sender I only get the selector. The sender is a private type called _UIMenuBarItem. I can see in the debugger that there is a reference to the command and the propertyList but there’s no public API to get to either. BTW - that is the result while testing the Mac Catalyst version of the app.
Topic: UI Frameworks SubTopic: UIKit
Aug ’25
Reply to Toolbar tint color with Liquid Glass
There are several existing discussions on this bug. Many people have filed bug reports since beta 1. So far it seems as if Apple really wants black and white interfaces starting with iOS 26. The tintColor of UIBarButtonItem can work in some cases. Basically only for prominent buttons not made with a custom view. Feel free to file a bug report. Maybe one more will be enough for Apple to fix the problem.
Topic: UI Frameworks SubTopic: General
Aug ’25