Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Updated to Swift 5.0.
Old
@objc public var defaultInitialScale: CGFloat
@objc public var defaultCornerRadius: CGFloat
@objc public var defaultTopOffset: CGFloat
@objc public var defaultBottomOffset: CGFloat
@objc public var defaultImageWidth: CGFloat
@objc public var defaultAlertWidth: CGFloat
@objc public var defaultImageBottomSpace: CGFloat
@objc public var defaultTitleBottomSpace: CGFloat
@objc public var defaultImageToMessageSpace: CGFloat
New
@objc public var initialScale: CGFloat
@objc public var cornerRadius: CGFloat
@objc public var topOffset: CGFloat
@objc public var bottomOffset: CGFloat
@objc public var imageWidth: CGFloat
@objc public var alertWidth: CGFloat
@objc public var imageBottomSpace: CGFloat
@objc public var titleBottomSpace: CGFloat
@objc public var imageToMessageSpace: CGFloat
blurStyle
property to appearanceUpdated to Swift 4.2.
Old
let statusAlert = StatusAlert.instantiate(
withImage: image,
title: title,
message: message,
canBePickedOrDismissed: isPickable
)
New
let statusAlert = StatusAlert()
statusAlert.image = image
statusAlert.title = title
statusAlert.message = message
statusAlert.canBePickedOrDismissed = isPickable
multiplePresentationsBehavior
default value is .ignoreIfAlreadyPresenting
nowUIImageView
s, UILabel
s and space UIView
snow has common
property, used by default by all alerts.
Old
StatusAlert.Appearance.contentColor = UIColor.black
New
// contentColor was renamed to tintColor
StatusAlert.Appearance.common.tintColor = UIColor.black
now can be set up with appearance
property of type StatusAlert.Appearance
. By default will be user StatusAlert.Appearance.common
.
Old
statusAlert.contentColor = UIColor.black
New
statusAlert.appearance.tintColor = UIColor.black
no longer can be passed as associated value to enum case. Instead, offset can be passed as parameter to show
method.
Old
statusAlert.show(withVerticalPosition: .center(offset: 8)
New
statusAlert.show(withVerticalPosition: .center, offset: 8)
Added Swift Package Manager support.