Xcode 26 XIB ignores difference between NSView frame and alignment rectangles

In the last three betas of Xcode 26, opening XIB files that rely on the older struts-and-springs setup (rather than Auto Layout) has exposed a new problem: Xcode 26 ignore the difference between a view’s frame and alignment rectangle.

If you had arranged views using their frame rectangle (the default for the old method) this causes two problems:

  • All UI widgets are both larger and no longer aligned.
  • Switching between frame and alignment rectangles while configuring any NSView (through the inspector setting) has no effect.

Is anyone else seeing this? It’s one thing to convert a few smaller views to Auto-layout (its reliance on alignment rectangles makes it immune to the "death" of frame rectangle-based layout) it is a rather different task to re-layout thousands of UI widgets as a result of this one bug.

Filed as FB18835363

This looks like a bug in AppKit... even if you manually re-adjust all your UI, this will only fix the appearance on macOS 26. On prior versions of macOS, many UI widgets will look smaller than they should be, all as a side effect of AppKit no longer interpreting frame rectangle vs alignment rectangle.

Unclear if the fix would be to have the XIB compiler actually spit out the correct rectangles so as to maintain visual consistency with all versions of macOS.

Posting this here as a summary for the three people left writing native macOS apps using AppKit, who might stumble here from a search.

macOS 26 has brought us the yearly facelift that – as tradition – brings no break-through features or discernible improvement to usability (quite the opposite, this time around). This year’s diktat from Marketing has also brought a regression that affects how AppKit reconstructs and displays UIs in XIB/NIB files. (Haven't checked if this exists on UIKit too.) If you had carefully laid out your controls to be aligned without the assistance of auto-layout, reopening these files with Xcode 26 will show all controls to be misaligned. This same problem is sadly visible at runtime too. AppKit has removed the crucial distinction between frame rectangles and alignment rectangles. You would be spared from this problem only if your controls were participating in auto-layout by having at least one constraint, or by calling -[NSView setTranslatesAutoresizingMaskIntoConstraints:YES] and setting constraints programmatically.

The most obvious solution is to slowly add constraints to all your XIBs. It makes sense if your app uses simpler view hierarchies. For complex hierarchies, auto-layout never was a viable option. The more constraints you add to your XIB the slower it becomes, until the point where adding a single widget or constraint will take seconds. Assuming they ship with this regression (still there as of Beta 4) the solution for large XIBs is to painfully realign and resize all controls while leaving them on the older springs-and-struts layout system. This luckily can still be done fast in Xcode. The downside? All your controls will look correct on macOS 26 but will be both misaligned and probably look too small on previous versions of macOS. For the latter problem you can thank the fact that they changed the size of controls so that a small button or popup menu on macOS 26 is taller and wider than on previous versions 🤷‍♂️ (my previous post was incorrect on this point)

Here we are in 2025 with NextStep-era UI still being the only one you can preview and layout reliably both in Xcode and at runtime. They never allowed auto-layout to become great. Having used it both programmatically and visually, it's been left 90% done to make room for SwiftUI, now 6 years old and nowhere near usable without massive problems and frustration. I wouldn't be surprised if more apps switch to non-native UI frameworks just to stay away from this. Taking a step back from this particular regression, the broader picture is that Apple keeps externalizing upkeep costs to its third-party developers with a yearly facelift that feels more and more superficial, adding busywork to our schedule, forcing rewrites and redesigns, and bringing no rewards. Even if you jump through all of these hoops, your software gains no new features that might actually be considered valuable to users.

Best of luck!

wow i haven’t got on 26 but i have plenty of nibs with autolayout constraints. hopefully they don’t ship this.

i’m one of the three still using AppKit. i won’t touch SwiftUI with a ten foot pole

If your NIBs already have auto-layout constraints, they will look and work OK on macOS 26. The problem I described only affects views that are laid out without any constraints, using the Autoresizing Mask, or Inferred (Autoresizing Mask). The issue is that for complex UI, the "old stuff" is really the only one that performs well both when making changes through the Xcode Editor, and at runtime.

Xcode 26 XIB ignores difference between NSView frame and alignment rectangles
 
 
Q