Post

Replies

Boosts

Views

Activity

In SwiftUI, are there any good ways to set a custom tap target, to ensure it's always 44x44.
for example: Our designers want our "Disclosures/Legal" info icon, to be 4px from the text. So we end up needing to "hack" around the view, to make the info tap target exist "over" the text. without any hacks, if we use a 20x20 icon + 4 padding, the tap target is only 28px wide. the "hack" in question, usually involves adding paddings + inverted (negative) padding, to increase the tap target, without affecting layout
1
1
858
Jun ’26
In SwiftUI, are there any good ways to set a custom tap target, to ensure it's always 44x44.
for example: Our designers want our "Disclosures/Legal" info icon, to be 4px from the text. So we end up needing to "hack" around the view, to make the info tap target exist "over" the text. without any hacks, if we use a 20x20 icon + 4 padding, the tap target is only 28px wide. the "hack" in question, usually involves adding paddings + inverted (negative) padding, to increase the tap target, without affecting layout
Replies
1
Boosts
1
Views
858
Activity
Jun ’26