Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions resources/ios/NativeUIButtonGroupRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ struct NativeUIButtonGroupRenderer: View {
.frame(maxWidth: .infinity)
.foregroundStyle(isSelected ? theme.onPrimary : theme.onSurface)
.background(isSelected ? theme.primary : Color.clear)
// A plain-style button only hit-tests drawn content, so an
// unselected segment's clear background would leave just the
// label tappable. Make the whole segment the tap target.
.contentShape(Rectangle())
}
.buttonStyle(.plain)
.disabled(disabled)
Expand Down