Before iOS 15 there was no .foregroundStyle(_:) modifier, so it was a bit more tricky to use a gradient this way. In iOS 15 and newer versions all we have to do is pass the gradient. This is because LinearGradient conforms to the ShapeStyle protocol as well as the View protocol.
This is an app that lets you use a TextF…
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

