reports icon indicating copy to clipboard operation
reports copied to clipboard

FB16632534: Create analogues to UIButton.Configuration on SwiftUI Button

Open samhenrigold opened this issue 8 months ago • 0 comments

Submission Date

2025-02-26

Status

Open

Area

SwiftUI

Operating System Version

iOS 18.4

Type

Suggestion

Description

In iOS 15, UIButton got some useful configuration properties:

  • subtitle
  • titlePadding
  • imagePlacement, imagePadding, imageReservation
  • showsActivityIndicator

In SwiftUI, all of these things have to be built from scratch, even if the resulting button is otherwise just one of the built-in button styles. If I wanted a .borderedProminent button with either a trailing image or an activity indicator, I’ll have to recreate it from scratch and throw away the conveniences SwiftUI provides me.

Keywords

UIButton, AsyncButton, ButtonStyle

Prerequisites

  • [x] The title follows the format FB<number>: <title>
  • [x] I will keep this issue updated with Apple's responses

samhenrigold avatar Apr 24 '25 14:04 samhenrigold