Segment

public struct Segment : JSONDictEncodable

Represents a styled segment of a string

  • String represented by this Segment

    Declaration

    Swift

    public let text: String
  • Style applied to this Segment

    Declaration

    Swift

    public let style: Style
  • Creates a Segment to be used inside of a Text layer

    Declaration

    Swift

    public init(text: String, style: Style)

    Parameters

    text

    String represented by this Segment

    style

    Style applied to this Segment

  • Undocumented

    Declaration

    Swift

    public init?(json: [String : Any])
  • Undocumented

    Declaration

    Swift

    public func toJson() -> [String : Any]