NSSegmentedControl style ineffective.

I'm not sure if it's something wrong with my XCode install (Version 27.1, macOS 27.2) or what, because such a serious issue should be mentioned already...
Basically, building my objC app with the latest XCode makes the NSSegmentedControl style ineffective. Likewise, changing the style in the attribute of the control in interface builder has no visible effect on the preview either.
Changing the style in code or in IB has no effect. The control appears stuck with a style that implements a blue background for the selected segment (some default style I guess).
I tried with a minimalistic app that includes only one window and the control. The issue is still present.

Any suggestion? Am I the only one experiencing this?

my XCode install (Version 27.1, macOS 27.2

Welcome to the bleeding edge

my objC app with the latest XCode makes the NSSegmentedControl style

Those are some legacy languages and platform there

The control appears stuck with a style that implements a blue background for the selected segment

I do see that behaviour for an NSSegmentedControl in view content. However, an NSSegmentedControl in a toolbar looks radically different.

What kind of style are you trying to change? And if it's a minimalistic app, why do you care?

Generally speaking, I am finding myself reimplementing a lot of already-provided functionality these days. The higher-level the API, the more likely I am to re-write it.

Written by Etresoft in 912456022

What kind of style are you trying to change? And if it's a minimalistic app, why do you care?

I'm not sure what legacy platform you're referring to, but FYI, the minimanist app was just made to confirm the issue. It happens in my non-minimalist app.
Anyhow, the fact that changing the style has no effect is a rather serious issue for anyone building an app with segmented controls.

OK, it appears that the new role property of NSSegmentedControl is what changes the appearance under macOS 27. Apple should make clear that the style property is ineffective.

I'm not sure what legacy platform you're referring to

You're writing a Mac app in Objective-C. If you encounter problems with that combination, you're usually going to have to figure out a solution yourself. There aren't many other people doing that.

OK, it appears that the new role property of NSSegmentedControl is what changes the appearance under macOS 27. Apple should make clear that the style property is ineffective.

Documentation isn't Apple's priority. There's 25 years of legacy UI documentation and behaviour that is going to be different depending on 1) the Xcode SDK you're using, 2) your minimum deployment version, and 3) the OS version your app is running on.

You can see this very clearly in NSSegmentedControl's documentation. There's lot's of it, isn't there? But it's not complete. Certain properties, methods, and enums don't seem to have any. If you click on them, you'll see why. Anything that was introducted in 10.13 or later isn't documented. That's 9 years now that Apple's stopped updating the documentation.

For modern systems, the expectation is that you'll use SwiftUI. I'm not saying you should do that. I tried it for a new app and gave up after six months. Never finished the app either.

You can still use the legacy languages, targets, and platforms, but it will be your responsibility to understand how they work and test them on all supported OS versions. Sometimes you can use virtual machines anything before 26. But 26+ adds so much GPU-heavy UI that you really need real hardware for testing.

These APIs and behaviours on different OS versions can and will change, even with minor versions. As I said before, the best way to insulate yourself is to write your own code. If you don't like the new behavout of NSSegmentedControl, you'll have to re-implement it. It wouldn't be difficult. It's a simple control.

Written by Etresoft in 912698022

You can still use the legacy languages, targets, and platforms, but it will be your responsibility to understand how they work and test them on all supported OS versions.

A method that is not depecrated should work as intended. If developers don't hold Apple to basic standards, no one else will. NSSegmentedControl style is not deprecated, neither is ObjC.

A method that is not depecrated should work as intended.

And what if it doesn't?

If developers don't hold Apple to basic standards, no one else will.

How do you suggest we do that? We have no power over Apple. We only have power over our own code. Apple only has power over the hardware, the operating system, and the APIs. In many cases, especially with respect to user interface controls, developers still have a lot of freedom to make their own implementations.

NSSegmentedControl style is not deprecated, neither is ObjC.

No, but you aren't going to see them in any WWDC anytime soon. These are not areas where Apple is putting any focus, except in the manner that you're complaining about. Your options are 1) live with it or 2) reimplement it.

Written by Etresoft in 913330022

And what if it doesn't?

Then Apple should fix the issue.

How do you suggest we do that?

By reporting issues. That's what this forum is for. I'm not sure why you're here.

Then Apple should fix the issue.

And if they don't?

By reporting issues. That's what this forum is for.

This is a discussion forum for Apple developers. It's a separate service from Apple's Feedback Assistant.

I'm not sure why you're here.

I like to help other developers with practical, real-world solutions. But you can't help 'em all.

So file that feedback report. Hopefully Apple will fix the problem real soon.