UIBarButtonItem alignment in UIToolbar on iOS 26 in UIDesignRequiresCompatibility mode

The screenshot is showing the same app deployed using Xcode version 26.0 beta 4 (17A5285i) on iOS 18.5 and on iOS 26.0.

In iOS 26 beta 4 on the right the spacing of the UIBarButtonItem elements does not look good:

The buttons are created like so:

colorButtonText = [[UIBarButtonItem alloc] initWithImage:[UIImage systemImageNamed:@"paintbrush"] style:UIBarButtonItemStylePlain target:self action:@selector(drawingActionColor:)];
//...
[drawingToolbarText setItems:@[colorButtonText, ...]];

Is this a known issue with the current iOS 26? Am I doing something wrong?

Did you ever get to the bottom of this? The same behaviour still exists in the latest version iOS 26.

For the time being I have worked round it by creating UIButtons and using these as a custom view for the UIBarButtonItem. This aligns them correctly in the vertical plane at least.

Yes, I can confirm that - I've tried it with all the current versions. Unfortunately I haven't found a good workaround for this issue yet.

Thank you for your post. It appears that you are developing a UIToolbar in Objective-C. How did you attempt to utilize SwiftUI or Storyboards? In Objective-C, the UIBarButtonItem appears to render sequentially without constraints. You may need to incorporate constraints in code as well.

However, I concur that the new version should not differ from the previous one. Have you attempted to use it in the latest beta of iOS? Do you observe any discrepancies? Could you kindly provide a concise focused sample that illustrates the problem?

If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

Albert Pascual
  Worldwide Developer Relations.

UIBarButtonItem alignment in UIToolbar on iOS 26 in UIDesignRequiresCompatibility mode
 
 
Q