项目作者: trilliwon

项目描述 :
Simple DropDown Alert View For Any iOS Projects.
高级语言: Swift
项目地址: git://github.com/trilliwon/JDropDownAlert.git
创建时间: 2016-04-24T05:10:03Z
项目社区:https://github.com/trilliwon/JDropDownAlert

开源协议:MIT License

下载


⚠️ DEPRECATED, NO LONGER MAINTAINED

JDropDownAlert

Swift
Platform
spm
Version
License
Build Status
codecov
Issues

JDropDownALert

Simple DropDown Alert View For Any iOS Projects.

Usage

Top

  1. let alert = JDropDownAlert()
  2. alert.alertWith("U can use just title")
  3. alert.didTapBlock = {
  4. print("Top View Did Tapped")
  5. }
  6. let alert = JDropDownAlert()
  7. alert.alertWith(titleString, message: messageString)
  8. alert.didTapBlock = {
  9. print("Top View Did Tapped")
  10. }

Top With Directions

  1. let alert = JDropDownAlert(position: .top, direction: .toLeft)
  2. alert.alertWith(titleString, message: messageString)
  3. alert.didTapBlock = {
  4. print("Top View Did Tapped")
  5. }
  6. let alert = JDropDownAlert(position: .top, direction: .toRight)
  7. alert.alertWith(titleString, message: messageString, topLabelColor: UIColor.white, messageLabelColor: UIColor.darkGray, backgroundColor: UIColor.brown)
  8. // alert.alertWith(titleString, message: messageString, topLabelColor: UIColor.white, messageLabelColor: UIColor.darkGray)
  9. // alert.alertWith(titleString, message: messageString, topLabelColor: UIColor.white)
  10. // alert.alertWith(titleString, message: messageString)
  11. alert.didTapBlock = {
  12. print("Top View Did Tapped")
  13. }

Bottom

  1. let alert = JDropDownAlert(position: .bottom)
  2. alert.alertWith(titleString, message: messageString)
  3. alert.didTapBlock = {
  4. print("Bottom Alert View Did Tapped")
  5. }

Bottom With Directions

  1. let alert = JDropDownAlert(position: .bottom, direction: .toLeft)
  2. alert.alertWith(titleString, message: messageString)
  3. alert.didTapBlock = {
  4. print("Bottom Alert View Did Tapped")
  5. }
  6. let alert = JDropDownAlert(position: .bottom, direction: .toRight)
  7. alert.alertWith(titleString, message: messageString)
  8. alert.didTapBlock = {
  9. print("Bottom Alert View Did Tapped")
  10. }

Different Positions and Animation Directions

  1. enum AlertPosition {
  2. case top
  3. case bottom
  4. }
  5. enum AnimationDirection {
  6. case toLeft
  7. case toRight
  8. case normal
  9. }

Requirements

  • iOS 8.0 +
  • swift 3.0
  • Xcode 8.0

Installation

JDropDownAlert is available through CocoaPods. To install
it, simply add the following line to your Podfile:

  1. pod "JDropDownAlert"

Add the JDropDownAlert.swift in to your project.

Credits

Author

Contributors

Any contribution is welcome. Just submit a pull request.

License

JDropDownAlert is available under the MIT license. See the LICENSE file for more info.

Demo Gifs

top alert
bottom alert