-
Notifications
You must be signed in to change notification settings - Fork 49
Appearance
StatusAlert's appearance presented as StatusAlert.Appearance. It has common property, which contains default appearance settings for all newly created alerts.
public var titleFont: UIFontUsed for StatusAlert's title label.
public var messageFont: UIFontUsed for StatusAlert's message label.
public var tintColor: UIColorUsed as
textColorfor title and message labels and as imagetintColor(if image is in template mode).
public var backgroundColor: UIColorUsed as alert's background color.
NOTE
Used only if "Reduce transparency" mode is on (See Accessibility for more details).
public var blurStyle: UIBlurEffect.StyleUsed if blur is available.
To edit default appearance for all alerts in the application you should edit StatusAlert.Appearance.common.
EXAMPLE
To make
titleFontto be system font of size 17 and weight Regular do the following:
StatusAlert.Appearance.titleFont = UIFont.systemFont(ofSize: 17, weight: UIFontWeightRegular)After that all alert will have this appearance unless you change it for specific instance.
To change appearance of the single alert edit alert's appearance property.
EXAMPLE
To make
titleFontto be system font of size 17 and weight Regular do the following:
alert.appearance.titleFont = UIFont.systemFont(ofSize: 17, weight: UIFontWeightRegular)After that this alert will have different appearance, but the other alert's appearance will not be affected.