Releases: Daltron/NotificationBanner
NotificationBanner Release v1.3.3
Fixes an issue where an array out of bounds exception would occur when a banner is dismissed if it wasn't placed on the NotificationBannerQueue
Thanks @shanev! 👍
NotificationBanner Release v1.3.2
Changes:
BannerColors
property added to banners initialized with attributed text.
Thanks @harmjanr! 👍
Fixed an issue causing banners with long titles not to scroll properly.
A huge thanks to @cbpowell for working closely with me to address this! 👍
Thanks @egenvall for first reporting the issue! 👍
Closes #10 🎉
New CocoaPods Release: v1.3.2 ✅
NotificationBanner Release v1.3.0
Changes:
Banners can now be shown underneath a navigation bar
If you are wanting to show a banner below a navigation bar, simply show on the view controller that is within the navigation system:
banner.show(on: viewController)
Closes #16 🎉
Banners can now be shown infinitely until they are manually dismissed
To show a banner infinitely until it is manually dismissed, simply:
banner.autoDimiss = false
Closes #19 🎉
Haptic Feedback support
By default, when a banner is displayed, a haptic feedback will be generated on devices that support it. The types of haptic feedback are as follows:
public enum BannerHaptic {
case light
case medium
case heavy
case none
}
To change the type of haptic feedback to generate when a banner is shown, simply:
banner.haptic = .heavy
Closes #15 🎉
New CocoaPods Release: v1.3.0 ✅
Thanks @nick-iCars! 👍
NotificationBanner Release v1.2.0
Changes:
• NotificationBanner's now have a isDisplaying
boolean property which will tell you wether or not the banner is currently being displayed.
• The NotificationBannerQueue is now a public class that can be accessed via:
let bannerQueue = NotificationBannerQueue.default
As of right now, the only thing that can be obtained from the banner queue is a property called numberOfBanners
which tells you how many notification banners are currently on the queue.
New CocoaPods Release: v1.2.0 ✅
Closes #8 🎉
Thanks @JoniVR! 👍
NotificationBanner Release v1.1.0
New Features:
Custom Banner Style Colors
You can now override the predefined colors that NotificationBanner uses for any style by conforming to the BannerColorsProtocol
:
public protocol BannerColorsProtocol {
func color(for style: BannerStyle) -> UIColor
}
Its as easy as creating a custom banner colors class:
class CustomBannerColors: BannerColorsProtocol {
internal override func color(for style: BannerStyle) -> UIColor {
switch style {
case .danger: // Your custom .danger color
case .info: // Your custom .info color
case .none: // Your custom .none color
case .success: // Your custom .success color
case .warning: // Your custom .warning color
}
}
}
And then passing in that class to any notification banner you create:
let banner = NotificationBanner(title: title, style: .success, colors: CustomBannerColors())
banner.show()
Swipe Up Support
Notification banners (by default) will now also be dismissed if the user swipes up on the banner. To detect when a user swipes up on a banner, simply:
banner.onSwipeUp = {
// Do something regarding the banner
}
Better Documentation
Added more documentation for most functions in most of the classes