ws1227 / JDropDownAlert

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JDropDownAlert

Language [![CI Status](http://img.shields.io/travis/Steve Jo/JDropDownAlert.svg?style=flat)](https://travis-ci.org/Steve Jo/JDropDownAlert) Version License Platform Issues

JDropDownALert

Simple DropDown Alert View For Any iOS Projects.

Demo Gifs

top alert bottom alert

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)
    
    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
  }

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 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.

Author

License

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

About

License:MIT License


Languages

Language:Shell 56.9%Language:Swift 36.3%Language:Ruby 3.7%Language:Objective-C 3.1%