UIConfiguration

public struct UIConfiguration

The UI values that can be configured

  • The font used within the Glad App header. Default is the system font of size 18. Chat messages will use this font if ‘secondaryFont’ is not configured.

    Custom fonts are supported. Font file must be included in your project as well as added the ‘info.plist’. Custom font name must also exactly match the font file name. See examples below:

    • Valid Example 1:
      • name: CustomFont
      • file: CustomFont.ttf
    • Valid Example 2:
      • name: “Custom Font”
      • file: “Custom Font.otf”
    • Invalid Example:
      • name: CustomFont
      • file: “Custom Font.ttf”

    Declaration

    Swift

    public var font: UIFont
  • The font used within the chat window.

    Custom fonts are supported. Font file must be included in your project as well as added the info.plist. Custom font name must also exactly match the font file name. See examples below:

    • Valid Example 1:
      • name: CustomFont
      • file: CustomFont.ttf
    • Valid Example 2:
      • name: “Custom Font”
      • file: “Custom Font.otf”
    • Invalid Example:
      • name: CustomFont
      • file: “Custom Font.ttf”

    Declaration

    Swift

    public var secondaryFont: UIFont?
  • An optional time format can be specified. Timestamps in the chat window will use this formatting. Supported tokens are below and are case-sensitive:

    • ‘HH’ or ‘hh’ –> 24 hour time or 12 hour time
    • ‘mm’ –> minutes
    • ‘ss’ –> seconds
    • ‘a’ or ‘A’ –> am/pm or AM/PM
    • Example time format: ‘hh:mm:ss a’ –> ‘11:30:15 am’

    Declaration

    Swift

    public var timeFormat: String?
  • An optional date format can be specified. Dates in the chat window will use this formatting. Supported tokens are below and are case-sensitive:

    • Year:
      • ‘YY’ –> 70 71 … 29 30
      • ‘YYYY’ –> 1970 1971 … 2029 2030
    • Month:
      • ‘M’ –> 1 2 … 11 12
      • ‘MM’ –> 01 02 … 11 12
      • ‘MMM’ –> Jan Feb … Nov Dec
      • ‘MMMM’ –> January February … November December
    • Day:
      • ‘D’ –> 1 2 … 30 31
      • ‘DD’ –> 01 02 … 30 31
    • Example date format: ‘MMM D, YYYY’ –> ‘Jan 3, 2020’

    Declaration

    Swift

    public var dateFormat: String?
  • The customizable header configuration. See UIHeaderConfiguration for details.

    Declaration

    Swift

    public var header: UIHeaderConfiguration
  • The customizable loading indicator view. Default is a spinning gray circle. Loading indicator will display while Gladly is loading

    Declaration

    Swift

    public var loadingView: UIActivityIndicatorView