DPNotify used to send short notifications on screen simple & quickly for iOS developing using Swift.
- 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)
Just add file named DPNotify.swift to your project.
- 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:{()->Voidinvaralert=UIAlertView(
title:"Completed!",
message:"Notify showed!",
delegate:nil,
cancelButtonTitle:"Hit ;-)")
alert.show()})- Dismiss message:
DPNotify.sharedNotify.dismissNotify()DPNotify.sharedNotify.dismissNotify({()->Void in
varalert=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)
Homepage: https://www.dphans.me - Email: baophan94@icloud.com.
