Giter Club home page Giter Club logo

jknotificationpanel's Introduction

JKNotificationPanel

Version License Platform

Simple, Customizable notification panel

JKNotificationPanel

Requirements

  • Swift 2.1
  • Xcode 6
  • iOS 8.0 or above

Installation

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

pod "JKNotificationPanel"

Usage

Using JKNotification panel is very easy.

Basic Usage

First of all you need to create JKNotifictionPanel

let panel = JKNotificationPanel()

Displaying the basic panel

panel.showNotify(withStatus: .SUCCESS, inView: self.view, message: "Success to upload all images.")

Displaying the panel below the navigation

panel.showNotify(withStatus: .FAILED, belowNavigation: self.navigationController!)

Custom View

let nib = UINib(nibName: "CustomNotificationView", bundle: NSBundle(forClass: self.dynamicType))

let customView  = nib.instantiateWithOwner(nil, options: nil).first as! UIView
let width:CGFloat = UIScreen.mainScreen().bounds.size.width
customView.frame = CGRectMake(0, 0, width, 20)

panel.showNotify(withView: customView, belowNavigation: self.navigationController!)

Tab to dissmiss

panel.timeUntilDismiss = 0 // zero for wait forever
panel.enableTabDismiss = true
panel.showNotify(withStatus: .SUCCESS, belowNavigation: self.navigationController!, message: "Tap me to dissmiss")

Delegate

func notificationPanelDidDismiss ()
func notificationPanelDidTab()

User tab action

If you don't want to use delegate you can also use tab action instead.

panel.timeUntilDismiss = 0 // zero for wait forever
panel.enableTabDismiss = false
panel.addPanelDidTabAction() {
self.notificationPanelDidTab()
}
panel.showNotify(withStatus: .SUCCESS, belowNavigation: self.navigationController!, message: "Tab me to show alert")

Author

Ter, http://www.macfeteria.com

License

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

jknotificationpanel's People

Contributors

macfeteria avatar readmecritic avatar

Watchers

woshizilong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.