Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dphans/DPNotify
DPNotify used to send short notifications on screen simple & quickly for iOS developing using Swift.
https://github.com/dphans/DPNotify
Last synced: 3 months ago
JSON representation
DPNotify used to send short notifications on screen simple & quickly for iOS developing using Swift.
- Host: GitHub
- URL: https://github.com/dphans/DPNotify
- Owner: dphans
- Created: 2015-06-26T18:29:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-10-14T10:27:09.000Z (over 2 years ago)
- Last Synced: 2024-08-03T14:10:21.066Z (7 months ago)
- Language: Swift
- Size: 1.18 MB
- Stars: 39
- Watchers: 5
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DPNotify
DPNotify used to send short notifications on screen simple & quickly for iOS developing using Swift.# Preview
# 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:
``` swift
DPNotify.sharedNotify.showNotifyInView(view, title: "Awesome :P", dismissOnTap: true, notifyType: .DEFAULT)
```- Completion handler:
``` swift
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:
``` swift
DPNotify.sharedNotify.dismissNotify()
```
``` swift
DPNotify.sharedNotify.dismissNotify({ () -> Void in
var alert = UIAlertView(title: "Completed!", message: "Notify dismissed!", delegate: nil, cancelButtonTitle: "はい!")
alert.show()
```- Custom style:
``` swfit
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: [email protected].