Daltron / NotificationBanner

The easiest way to display highly customizable in app notification banners in iOS
MIT License
4.78k stars 662 forks source link

Add public initializer to BannerColors #297

Closed hkellaway closed 4 years ago

hkellaway commented 4 years ago

To enable clients to do something like this:

class EventLogColors: BannerColorsProtocol {

    private let defaults: BannerColors

    init(defaults: BannerColors = BannerColors()) {
        self.defaults = defaults
    }

    func color(for style: BannerStyle) -> UIColor {
        switch style {
        case .info:
            return .myCustomInfoColor
        case .danger:
            return .myCustomDangerColor
        default:
            return defaults.color(for: style)
        }
    }

}
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically closed due to inactivity.