I have a custom segment control where i want to increase height and custom background color.
Loading
I have a custom segment control where i want to increase height and custom background color.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tasadduq BurneyPosted Dec 8, 2025, 5:46 PM
Hey,
Hope you're keeping well.
SwiftUI’s native
SegmentedControldoesn’t expose direct height or background styling, so you’ll need to wrap it in a customPickerwith.segmentedstyle and then apply modifiers like.frame(height:)for size and.background()or.overlay()for color. For dynamic themes, bind toEnvironment(\.colorScheme)and adjust colors to meet WCAG contrast guidelines. If this were a .NET MAUI app targeting iOS, you’d achieve similar results by creating a custom handler forUISegmentedControlin the iOS-specific project, overridingBackgroundColorandHeightviaPlatformView, ensuring accessibility sizing remains intact. This keeps the styling consistent across platforms while allowing full control over UI customization.Thanks and regards,
Taz