CocoaPods trunk is moving to be read-only. Read more on the blog, there are 4 months to go.

LCNotificationBanner 1.0.6

LCNotificationBanner 1.0.6

Maintained by DevLiuSir.



  • By
  • Marvin

LCNotificationBanner is a lightweight macOS notification banner component!


Banner display position

  • Using enumerations to define LCNotificationBannerPosition
public enum LCNotificationBannerPosition {
    case top
    case bottom
    case leftCenter
    case rightCenter
}

Preview of Notification Animations

Success Error
Info Warning
Only Text bottom
rightCenter leftCenter

How to use

Provide Success, Info, Warning, Error, and Custom banner type

  • Background color
LCNotificationBanner.shared.bgColor = NSColor.systemBlue.cgColor
  • Position
LCNotificationBanner.shared.position = .top
  • Icon size
LCNotificationBanner.shared.iconSize = 20
  • Title Font size
LCNotificationBanner.shared.titleFontSize = 14
  • Success type
LCNotificationBanner.showSuccessWithStatus("This is a banner title", style: .dark, to: view.window)
  • Error type
LCNotificationBanner.showErrorWithStatus("This is a banner title", style: .dark, to: view.window)
  • Info type
LCNotificationBanner.showInfoWithStatus("This is a banner title", style: .dark, to: view.window)
  • Warning type
LCNotificationBanner.showWarningWithStatus("This is a banner title", style: .dark, to: view.window)
  • Text type only
LCNotificationBanner.showTextWithStatus("This is a banner title", to: view.window)

Installation

CocoaPods

LCNotificationBanner is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'LCNotificationBanner'

License

MIT License

Copyright (c) 2024 Marvin

Star History

GPRG Star History Chart

Author

DevLiuSir

Software Engineer