How to make text stroke in swiftUI?
问题 I'm trying to make text-stroke in SwiftUI or add a border on my text, in the letters not the Text() item. Is it possible? I want to make this effect with the border: 回答1: I don't think there's a way for doing that "out of the box". So far (beta 5) we can apply strokes to Shapes only. For example: struct SomeView: View { var body: some View { Circle().stroke(Color.red) } } But again that isn’t available for Text . UIViewRepresentable Another approach would be to use the good ol' UIKit \