Document

public struct Document

Encapsulates the entire Sketch document

  • Pages of the document

    Declaration

    Swift

    public let pages: [Page]
  • Global colors defined in the document

    Declaration

    Swift

    public let colors: [Color]
  • Global text styles defined in the document

    Declaration

    Swift

    public let textStyles: [Text.SharedStyle]
  • Creates an entire Sketch Document

    Declaration

    Swift

    public init(pages: [Page], colors: [Color], textStyles: [Text.SharedStyle])

    Parameters

    pages

    List of Pages shown in the Document

    colors

    Global colors shared across the entire document

    textStyles

    Global text styles shared across the entire document

  • Undocumented

    Declaration

    Swift

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

    Declaration

    Swift

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