https://github.com/webmobi59/customnotificationbar
Custom APNS shower - Swift3.0
https://github.com/webmobi59/customnotificationbar
Last synced: about 1 month ago
JSON representation
Custom APNS shower - Swift3.0
- Host: GitHub
- URL: https://github.com/webmobi59/customnotificationbar
- Owner: WebMobi59
- License: mit
- Created: 2016-11-06T18:27:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-04T02:55:52.000Z (about 9 years ago)
- Last Synced: 2025-01-08T21:38:20.230Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/Carthage/Carthage)
[](http://cocoapods.org/pods/SwiftMessageBar)
[](http://cocoapods.org/pods/SwiftMessageBar)
[](http://cocoapods.org/pods/SwiftMessageBar)
# SwiftMessageBar
An iOS message bar, written in Swift

## Requirements
- 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+
## Installation
You can use [Carthage](https://github.com/Carthage/Carthage):
```ogdl
github "SelfnessAid/SwiftMessageBar"
```
or [CocoaPods](http://cocoapods.org):
```ruby
pod 'SwiftMessageBar'
```
## Usage
The included sample code shows how to use the message bar. There are three different message types:
```swift
enum MessageType {
case Error, Success, Info
}
```
To display a message:
```swift
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.
## Licence
Agrume is released under the MIT license. See LICENSE for details
# CustomNotificaionBar