Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tungvoduc/dtlocalnotification
Custom control that makes displaying in-app notifications easier, cleaner and more efficient.
https://github.com/tungvoduc/dtlocalnotification
cocoapods ios local-notification notification swift swift4 xcode
Last synced: 3 months ago
JSON representation
Custom control that makes displaying in-app notifications easier, cleaner and more efficient.
- Host: GitHub
- URL: https://github.com/tungvoduc/dtlocalnotification
- Owner: tungvoduc
- License: mit
- Created: 2018-04-14T14:17:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-01T00:39:56.000Z (over 5 years ago)
- Last Synced: 2024-10-13T02:21:17.207Z (3 months ago)
- Topics: cocoapods, ios, local-notification, notification, swift, swift4, xcode
- Language: Swift
- Size: 697 KB
- Stars: 33
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DTLocalNotification
[![Version](https://img.shields.io/cocoapods/v/DTLocalNotification.svg?style=flat)](http://cocoapods.org/pods/DTLocalNotification)
[![License](https://img.shields.io/cocoapods/l/DTLocalNotification.svg?style=flat)](http://cocoapods.org/pods/DTLocalNotification)
[![Platform](https://img.shields.io/cocoapods/p/DTLocalNotification.svg?style=flat)](http://cocoapods.org/pods/DTLocalNotification)## Screenshots
## Usage
In order to present a local notification, it is required to have a DTLocalNotification instance before asking the presenter to show it:```swift
let view = ExampleView(data: data)
let notification = DTLocalNotification(view: view)DTLocalNotificationPresenter.shared.showNotification(notification, completion: nil)
``````swift
let notification = CustomLocalNotificationViewController(data: data)DTLocalNotificationPresenter.shared.showNotification(notification, completion: nil)
```
As you can see, there are two different ways to present a local notification. The second way is usually more efficient when you want to present local notification view in a custom DTNotificationViewController(custom view layout, status bar style, backgroundColor, etc).
DTLocalNotificationPresenter and DTInteractiveLocalNotificationPresenter are two default presenters for presenting notification. In case you want to change the behaviors or animations or add more functionalities, simply subclass one of these two classes and make your own implementation.## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
### iOS 9.0+## Installation
DTLocalNotification is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'DTLocalNotification'
```## Author
Tung Vo, [email protected]
## License
DTLocalNotification is available under the MIT license. See the LICENSE file for more info.