GradientView - Tai-Kimura/SwiftJsonUI GitHub Wiki

GradientView

class: GradientView inherites: [SJUIView](/Tai-Kimura/SwiftJsonUI/wiki/View)

Platform Support

  • UIKit: Full support (All attributes available)
  • SwiftUI: Full support (Maps to LinearGradient)

Attributes for GradientView

attribute name UIKit SwiftUI type in json details remarks
gradient array Array of color strings for the gradient
gradientDirection string Direction: Vertical, Horizontal, Oblique
locations ✅ Dynamic array Gradient stop locations (0.0 to 1.0) Dynamic mode only
startPoint array Start point [x, y] for gradient
endPoint array End point [x, y] for gradient
All View attributes - Inherits all attributes from View See View