-
Notifications
You must be signed in to change notification settings - Fork 50
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: UIFont
Used for StatusAlert's title label.
public var messageFont: UIFont
Used for StatusAlert's message label.
public var tintColor: UIColor
Used as
textColor
for title and message labels and as imagetintColor
(if image is in template mode).
public var backgroundColor: UIColor
Used as alert's background color.
NOTE
Used only if "Reduce transparency" mode is on (See Accessibility for more details).
public var blurStyle: UIBlurEffect.Style
Used if blur is available.
To edit default appearance for all alerts in the application you should edit StatusAlert.Appearance.common
.
EXAMPLE
To make
titleFont
to 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
titleFont
to 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.