ASAPP.styles.colors.primary
.
ASAPP recommends starting out only setting .primary
to be your brand’s primary color, and adjusting other colors when necessary for accessibility.
.primary
is used as the message bubble background and in most buttons and other controls.
ASAPP.styles.colors.onBackground
and .onPrimary
. .onBackground
is used for most other elements that might appear in front of the background. .onPrimary
is used for text and other elements that appear in front of the primary color.
ASAPPFontFamily
to ASAPP.styles.textStyles.updateStyles(for:)
. There are two ASAPPFontFamily
initializers: one that takes font file names and another that takes UIFont
references.
ASAPP.styles.colors
.
Navigation bar colors are .navBarBackground
, .navBarTitle
, .navBarButton
, and .navBarButtonActive
.
.background
, .separatorPrimary
, .separatorSecondary
, .controlTint
, .controlSecondary
, .controlBackground
, .success
, .warning
, and .failure
.
ASAPPButtonColors
initializer. You can override .textButtonPrimary
, .buttonPrimary
, and .buttonSecondary
.
.messagesListBackground
, .messageText
, .messageBackground
, .messageBorder
, .replyMessageText
, .replyMessageBackground
, and .replyMessageBorder
.
ASAPPButtonColors
. You can override .quickReplyButton
and .actionButton
.
ASAPPInputColors
. You can override .chatInput
.
ASAPP.styles.textStyles.navButton
, .button
, .actionButton
, .link
, .header1
, .header2
, .header3
, .subheader
, .body
, .bodyBold
, .body2
, .bodyBold2
, .detail1
, .detail2
, and .error
. To update all but the first four with a color, call ASAPP.styles.textStyles.updateColors(with:)
.
ASAPP.styles.navBarStyles.titlePadding
using UIEdgeInsets
.
ASAPP.styles.primaryButtonRoundingStyle
. The default value is .radius(0)
. You can set it to a custom radius with .radius(_:)
or fully rounded with .pill
.
ASAPPCustomImage(image:size:insets:)
initializer to override each:
ASAPP.views.chatTitle
. If you set a custom title view, it will override any string you set as ASAPP.strings.chatTitle
. The title view will be rendered in the center of the navigation bar.
UIColor(named:)
initializer, which was introduced in iOS 11. After you have defined a dark variant for at least the primary color, be sure to set it and flip the Dark Mode flag:
ASAPP.views.chatTitle
.ASAPP.styles.isDarkModeAllowed
to ensure a consistent user experience.
ASAPP.styles.allowedOrientations
is .portraitLocked
, meaning the chat view controller will always render in portrait orientation. To allow landscape orientation on an iPad, set it to .iPadLandscapeAllowed
instead. There is currently no landscape orientation option for iPhone.
ASAPPStrings
.