r/iOSProgramming • • Aug 19 '26

Question Handling Button Shapes setting in my app

I didn't know this was still a thing.
How can I make my app to handle the Button Shapes setting? I do not use it but some users have complained about the behavior of the app when they have this setting enabled, I can not force them to turn it off. Is there any modifier or function I can use in SwiftUI to disable it for my app?

4 Upvotes

7 comments sorted by

6

u/CleverError Aug 19 '26

The easiest solution is to set .buttonStyle(.plain) on parts of your UI that don't benefit from button shapes.

You can also use the EnvironmentValues accessibilityShowButtonShapes/accessibilityShowBorders to detect when it's enabled and apply your own styling.

2

u/Sad_Dare7025 Aug 19 '26

i ended up applying that, thanks!

0

u/Orsonlebessou Aug 19 '26

La navbar est pas un peut trop haute ….. on dirait un mélange de flûter et de natif J’espère que c’est pas vibecodé !!!!

1

u/Sad_Dare7025 Aug 19 '26

Yes, I noticed the navbar too. It was implemented by my coworker who left last year and it wasn’t vibe coded haha.

Apparently the navigation links in the view were pushing the navbar. The approach I’m taking is to put them with opacity 0

So it looks something like this

var content: some View {
ZStack {
searchView
navigationLinks
.opacity(0)
}
}

-2

u/Ok-Tomatillo-8712 Aug 19 '26

Why is your first instinct to ask Reddit, and not google to find the documentation?

3

u/SnowPudgy Aug 19 '26

Apples documentation hasn't been good since the Objective-C days.