AlertBar
An easy alert on status bar.
Usage
Import
import AlertBar
Show alert message
AlertBar has default types:
- Success
- Error
- Notice
- Warning
- Info
AlertBar.show(.Success, message: "This is a Success message.")
And you can customize the background and text colors of AlertBar.
Select Custom
type and set background and text colors as UIColor: .Custom(BackgroundColor, TextColor)
AlertBar.show(.Custom(UIColor.lightGrayColor(), UIColor.blackColor()), message: "This is a Custom message.")
Alert duration
AlertBar accepts to custom alert duration.
AlertBar.show(.Success, message: "This is a Success message.", duration: 10)
Custom Options
TextAlignment
AlertBar accepts to custom text alignment.
NOTE: This option is global.
AlertBar.textAlignment = .Center
Requirements
- Swift 2.2
- iOS 8.0
- ARC
Installation
AlertBar is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "AlertBar"
Author
Jin Sasaki, [email protected]
License
AlertBar is available under the MIT license. See the LICENSE file for more info.