chiappins
chiappins

Reputation: 221

Force the Dark Mode to only one UI Element in Swift by storyboard or programmatically

I want to set the dark mode fixed for one UI element.

So I want that all the app switch automatically from dark to light but one element in my case a UISegmentedControl stays in dark mode.

Is it possible?

Upvotes: 2

Views: 409

Answers (1)

Frank Rupprecht
Frank Rupprecht

Reputation: 10398

Yes, you can set overrideUserInterfaceStyle on the control to .dark.

Upvotes: 2

Related Questions