Skip to content

dphans/DPNotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DPNotify

DPNotify used to send short notifications on screen simple & quickly for iOS developing using Swift.

Preview

alt tag

Features

  • block syntax.
  • delay timer.
  • 5 notify styles available (Default, Danger, Warning, Success, Disabled).
  • customize font & color.
  • tap to dismiss message.
  • request more? please contact me (my email below)

Installation

Just add file named DPNotify.swift to your project.

Examples

  • Show notify in self.view:
DPNotify.sharedNotify.showNotifyInView(view, title: "Awesome :P", dismissOnTap: true, notifyType: .DEFAULT)
  • Completion handler:
DPNotify.sharedNotify.showNotifyInView(view,
                title: items[indexPath.row],
                dismissOnTap: true,
                notifyType: .DANGER,
                delay: 0,
                completionHandler: { () -> Void in
                    var alert = UIAlertView(
                        title: "Completed!",
                        message: "Notify showed!",
                        delegate: nil,
                        cancelButtonTitle: "Hit ;-)")
                    alert.show()
                })
  • Dismiss message:
DPNotify.sharedNotify.dismissNotify()
DPNotify.sharedNotify.dismissNotify({ () -> Void in
                var alert = UIAlertView(title: "Completed!", message: "Notify dismissed!", delegate: nil, cancelButtonTitle: "はい!")
                alert.show()
  • Custom style:
DPNotify.sharedNotify.bannerForegroundColor = DPNotify.sharedNotify.color(0x607D8B, alpha: 1)
DPNotify.sharedNotify.bannerBackgroundColor = UIColor(white: 0.8, alpha: 0.8)
DPNotify.sharedNotify.notifyTitleFont = UIFont(name: "Avenir", size: 17.0)
DPNotify.sharedNotify.showNotifyInView(view, title: "Hello, Dino Phan :D", dismissOnTap: true)

Contact:

Homepage: https://www.dphans.me - Email: baophan94@icloud.com.

About

DPNotify used to send short notifications on screen simple & quickly for iOS developing using Swift.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages