An iOS message bar, written in Swift
- iOS 8+
- Swift 3
- For Swift 2.2 use a build tagged with 2.x.x
- For Swift 1.2 use a build tagged with 1.x.x
- Xcode 8.0+
You can use Carthage:
github "JanGorman/SwiftMessageBar"
or CocoaPods:
pod 'SwiftMessageBar'The included sample code shows how to use the message bar. There are three different message types:
enum MessageType {
case Error, Success, Info
}To display a message:
import SwiftMessageBar
@IBAction func showSuccess(sender: AnyObject) {
SwiftMessageBar.showMessageWithTitle("Success", message: "The Message Body", type: .Success)
}You can customize the duration of each message and also pass in a tap handler closure that is executed when a user taps on the message.
To customize the look of the messages, create a custom MessageBarConfig and set it on the shared messagebar. You can adjust the background and font colors, and pass in custom images to display.
Agrume is released under the MIT license. See LICENSE for details
