Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bryx-inc/BRYXBanner
A lightweight dropdown notification for iOS 7+, in Swift.
https://github.com/bryx-inc/BRYXBanner
Last synced: 6 days ago
JSON representation
A lightweight dropdown notification for iOS 7+, in Swift.
- Host: GitHub
- URL: https://github.com/bryx-inc/BRYXBanner
- Owner: bryx-inc
- License: mit
- Created: 2015-07-27T20:45:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-08-16T15:29:45.000Z (over 1 year ago)
- Last Synced: 2024-10-29T17:47:41.450Z (about 1 month ago)
- Language: Swift
- Size: 825 KB
- Stars: 1,007
- Watchers: 23
- Forks: 143
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - BRYXBanner - A lightweight dropdown notification for iOS 7+, in Swift. (UI / Alert & Action Sheet)
- awesome-ios-star - BRYXBanner - A lightweight dropdown notification for iOS 7+, in Swift. (UI / Alert & Action Sheet)
README
# BRYXBanner
[![Version](https://img.shields.io/cocoapods/v/BRYXBanner.svg?style=flat)](http://cocoapods.org/pods/BRYXBanner)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![License](https://img.shields.io/cocoapods/l/BRYXBanner.svg?style=flat)](http://cocoapods.org/pods/BRYXBanner)
[![Platform](https://img.shields.io/cocoapods/p/BRYXBanner.svg?style=flat)](http://cocoapods.org/pods/BRYXBanner)A lightweight dropdown banner for iOS 7+.
![Example](https://raw.githubusercontent.com/bryx-inc/BRYXBanner/master/Example/Demo.gif)
## Usage
Import `BRYXBanner`
```swift
import BRYXBanner
```Create a banner using the designated initializer.
```rust
let banner = Banner(title: "Image Notification", subtitle: "Here's a great image notification.", image: UIImage(named: "Icon"), backgroundColor: UIColor(red:48.00/255.0, green:174.0/255.0, blue:51.5/255.0, alpha:1.000))
banner.dismissesOnTap = true
banner.show(duration: 3.0)
```If you want the banner to persist until you call `.dismiss()`, leave the argument out of the call to `.show()`
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
Demo project requires iOS 8, though BRYXBanner works on iOS 7+.
## Installation
BRYXBanner is available through [CocoaPods](http://cocoapods.org) and [Carthage](https://github.com/Carthage/Carthage).
#### Using CocoaPods
To install it, simply add the following line to your Podfile:
```swift
pod 'BRYXBanner'
```If you need to support iOS 7, just copy `Banner.swift` into your Xcode project.
#### Using Carthage
Create a Cartfile in your project directory and add the following line.
```swift
github "bryx-inc/BRYXBanner"
```
Run `carthage update` from the command line. This will build the framework. The framework will be within `Carthage/build/BRYXBanner.framework`.Add the framework to your project by going to your app's targets and selecting the General tab. Drag the built framework onto `Linked Frameworks and Libraries`
Go to the Build Phases tab, click the `+` sign and add a new run script phase. Then add the following:
```
/usr/local/bin/carthage copy-frameworks
```
to the box under Shell. Finally click `+` to add a new input file. Replace the default with:```
$(SRCROOT)/Carthage/Build/iOS/BRYXBanner.framework
```Now build and run. You're all set! More information on Carthage is available [here](https://github.com/Carthage/Carthage).
### Swift Package Manager
Swift Package Manager integrates withj Xcode. To add BRYXBanner to your iOS project open your project in Xcode and select **File > Swift Packages > Add Package Dependency** and enter `[email protected]:bryx-inc/BRYXBanner.git` in the search bar.
## Authors
Harlan Haskins ([@harlanhaskins](https://github.com/harlanhaskins))
Adam Binsz ([@adambinsz](https://github.com/adambinsz))## License
BRYXBanner is available under the MIT license. See the LICENSE file for more info.