Skip to content

Lightweight Dropdown Notifications written entirely in Swift

License

Notifications You must be signed in to change notification settings

ohthatsjhall/JHDropdown

Repository files navigation

JHDropdown by Justin Hall

Platform: iOS 8+ Language: Swift 2 CocoaPods compatible License: MIT

Installation

  1. Manually add files to your XCode Project
  2. Install using CocoaPods

JHDropdown is now available on CocoaPods. Simply add the following to your project Podfile and install

platform :ios, '8.0'
use_frameworks!

pod 'JHDropdown'

Usage

Implementation

Call Dropdown.show(_:) when you want to show the notification

Dropdown.show("Set a message for the dropdown here", state: .Success, duration: 2.0, action: nil)

Customization

Customize the dropdown by using the .Custom DropdownState

let yourImage = UIImage(named: "yourimage")
let color = UIColor.anyColor()

Dropdown.show("Set a message for the dropdown here", state: .Custom(yourColor, yourImage), duration: 2.0, action: nil)

Completion Handler

Run code after the animation for the dropdown is complete

Dropdown.show("Set a message for the dropdown here", state: .Error, duration: 2.0) {
  // this code will run once animation is complete
}

📝 To Do List

  • Add 3D animations to JHDropdown
  • Add Carthage Installation support

Author

Justin Hall: @ohthatsjhall

License

JHDropdown is released under the MIT license. See LICENSE for details.

About

Lightweight Dropdown Notifications written entirely in Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published