Skip to content

Simple DropDown Alert View For Any iOS Projects.

License

Notifications You must be signed in to change notification settings

trilliwon/JDropDownAlert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5f93ea1 · Oct 8, 2021

History

49 Commits
May 3, 2018
May 24, 2017
May 17, 2017
Mar 1, 2020
May 24, 2017
Jun 11, 2016
Sep 30, 2016
May 24, 2017
May 20, 2018
Jun 11, 2016
May 17, 2017
Oct 17, 2018
May 24, 2017

Repository files navigation

⚠️ 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

    let alert = JDropDownAlert()
    alert.alertWith("U can use just title")
    
    alert.didTapBlock = {
      print("Top View Did Tapped")
    }
    
    let alert = JDropDownAlert()
    alert.alertWith(titleString, message: messageString)
    
    alert.didTapBlock = {
      print("Top View Did Tapped")
    }

Top With Directions

    let alert = JDropDownAlert(position: .top, direction: .toLeft)
    alert.alertWith(titleString, message: messageString)
    
    alert.didTapBlock = {
      print("Top View Did Tapped")
    }
    
    let alert = JDropDownAlert(position: .top, direction: .toRight)
    alert.alertWith(titleString, message: messageString, topLabelColor: UIColor.white, messageLabelColor: UIColor.darkGray, backgroundColor: UIColor.brown)

//  alert.alertWith(titleString, message: messageString, topLabelColor: UIColor.white, messageLabelColor: UIColor.darkGray)
//  alert.alertWith(titleString, message: messageString, topLabelColor: UIColor.white)
//  alert.alertWith(titleString, message: messageString)

    
    alert.didTapBlock = {
      print("Top View Did Tapped")
    }

Bottom

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

Bottom With Directions

    let alert = JDropDownAlert(position: .bottom, direction: .toLeft)
    alert.alertWith(titleString, message: messageString)
    
    alert.didTapBlock = {
      print("Bottom Alert View Did Tapped")
    }
    
    let alert = JDropDownAlert(position: .bottom, direction: .toRight)
    alert.alertWith(titleString, message: messageString)
    
    alert.didTapBlock = {
      print("Bottom Alert View Did Tapped")
    }

Different Positions and Animation Directions

  enum AlertPosition {
    case top
    case bottom
  }
  
  enum AnimationDirection {
    case toLeft
    case toRight
    case normal
  }

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:

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