123456789101112131415161718192021 |
- //
- // Text+Ex.swift
- // Pods
- //
- // Created by 100Years on 2025/3/13.
- //
- import SwiftUI
- public extension Text {
- func gradientForeground(colors: [Color], startPoint: UnitPoint, endPoint: UnitPoint) -> some View {
- self
- .overlay(
- LinearGradient(
- gradient: Gradient(colors: colors),
- startPoint: startPoint,
- endPoint: endPoint
- )
- .mask(self)
- )
- }
- }
|