All Projects → LeoNatan → Lnnotificationsui

LeoNatan / Lnnotificationsui

Licence: mit
A framework for displaying notifications similar to Apple's iOS 8 and iOS 9 notifications.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Lnnotificationsui

Ipokego
A native iOS client to map the Pokemon around you!
Stars: ✭ 637 (-20.67%)
Mutual labels:  notifications
Beeep
Go cross-platform library for sending desktop notifications, alerts and beeps
Stars: ✭ 716 (-10.83%)
Mutual labels:  notifications
Shiny
A Xamarin Framework for Backgrounding & Device Hardware Services (iOS, Android, UWP, Tizen, tvOS, watchOS, & more coming soon)
Stars: ✭ 763 (-4.98%)
Mutual labels:  notifications
Vue Notifications
Vue.js agnostic library for non-blocking notifications
Stars: ✭ 644 (-19.8%)
Mutual labels:  notifications
Opensource Socialnetwork
Open Source Social Network (OSSN) is a social networking software written in PHP. It allows you to make a social networking website and helps your members build social relationships, with people who share similar professional or personal interests. It is available in 16 international languages.
Stars: ✭ 710 (-11.58%)
Mutual labels:  notifications
Angular2 Notifications
A light and easy to use notifications library for Angular.
Stars: ✭ 735 (-8.47%)
Mutual labels:  notifications
Notify
File system event notification library on steroids.
Stars: ✭ 624 (-22.29%)
Mutual labels:  notifications
Demo Progressive Web App
🎉 A demo for progressive web application with features like offline, push notifications, background sync etc,
Stars: ✭ 798 (-0.62%)
Mutual labels:  notifications
Diun
Receive notifications when an image is updated on a Docker registry
Stars: ✭ 704 (-12.33%)
Mutual labels:  notifications
Notie
🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies
Stars: ✭ 6,170 (+668.37%)
Mutual labels:  notifications
Terminal Notifier
Send User Notifications on macOS from the command-line.
Stars: ✭ 5,766 (+618.06%)
Mutual labels:  notifications
Zabbix In Telegram
Zabbix Notifications with graphs in Telegram
Stars: ✭ 710 (-11.58%)
Mutual labels:  notifications
Vue Toastification
Vue notifications made easy!
Stars: ✭ 747 (-6.97%)
Mutual labels:  notifications
Server
A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)
Stars: ✭ 6,858 (+754.05%)
Mutual labels:  notifications
Laravel Notify
Flexible Flash notifications for Laravel
Stars: ✭ 787 (-1.99%)
Mutual labels:  notifications
Countly Sdk Android
Countly Product Analytics Android SDK
Stars: ✭ 626 (-22.04%)
Mutual labels:  notifications
Notify
A dead simple Go library for sending notifications to various messaging services.
Stars: ✭ 727 (-9.46%)
Mutual labels:  notifications
Burnttoast
Module for creating and displaying Toast Notifications on Microsoft Windows 10.
Stars: ✭ 796 (-0.87%)
Mutual labels:  notifications
Consul Alerts
A simple daemon to send notifications based on Consul health checks
Stars: ✭ 792 (-1.37%)
Mutual labels:  notifications
Vue Snotify
Vuejs 2 Notification Center
Stars: ✭ 755 (-5.98%)
Mutual labels:  notifications

Deprecation Notice

This framework is no longer under active devlopment. With iOS 10, you can now display native system notifications inside your app. I suggest migrating to Apple's new API going forward. This framework remains useful for iOS 8 & 9 support. New features will likely not be implemented, but bugs may be fixed.


LNNotificationsUI

LNNotificationsUI is a framework for displaying notifications similar to Apple's iOS 8 and iOS 9 notifications. It is meant to complement the native look and feel, by providing a pixel-accurate (as much as possible) recreation of the notifications.

See a video here.

PayPal Donation Button

Features

  • Native look & feel
  • Support for notifications of multiple sub-applications
  • Customizable notifications
  • Different banner styles:

 

  • Settings for registered sub-applications:

 

  • Sounds support
  • Xcode 6 framework

Adding to Your Project

Carthage

Add the following to your Cartfile:

github "LeoNatan/LNNotificationsUI"

Manual

Drag the LNNotificationsUI.xcodeproj project to your project, and add LNNotificationsUI.framework to Embedded Binaries in your project target's General tab. Xcode should sort everything else on its own.

CocoaPods

CocoaPods is not supported. There are many reasons for this. Instead of CocoaPods, use Carthage. You can continue using CocoaPods for for your other dependencies and Carthage for LNNotificationsUI.

Using the Framework

Project Integration

First import the umbrella header file:

@import LNNotificationsUI;

Registering Sub-applications

Before being able to post notifications, you need to register at least one sub-application with the system. Sub-applications provide a way to group notifications, each with its own identifier, name and icon and other settings. For example, a productivity app with an e-mail client and a calendar may register two sub-applications, "Mail" and "Calendar", with different icons and other more advanced settings, such calendar notifications appearing as alerts by default.

[[LNNotificationCenter defaultCenter] registerApplicationWithIdentifier:@"mail_app_identifier" name:@"Mail" icon:[UIImage imageNamed:@"MailApp"] defaultSettings:[LNNotificationAppSettings defaultNotificationAppSettings]];
[[LNNotificationCenter defaultCenter] registerApplicationWithIdentifier:@"cal_app_identifier" name:@"Calendar" icon:[UIImage imageNamed:@"CalApp"]  defaultSettings:[LNNotificationAppSettings defaultNotificationAppSettings]];

Note: For all available options for the default settings, take a look at the LNNotificationAppSettings class definition. + [LNNotificationAppSettings defaultNotificationAppSettings] is provided as a convenience for obtaining the default settings.

Displaying Notifications

Create a notification object, set the desired parameters and post it.

LNNotification* notification = [LNNotification notificationWithMessage:@"You've Got Mail!"];
[[LNNotificationCenter defaultCenter] presentNotification:notification forApplicationIdentifier:@"mail_app_identifier"];

Note: For all available notification properties, take a look at the LNNotification class definition.

Notification Actions

In addition to displaying notifications, you can associate actions with each notification. Each notification has a default action, as well as other actions that can be attached to the notification. When the user taps a notification or the appropriate button, the provided handler block is called.

LNNotification* notification = [LNNotification notificationWithMessage:@"Welcome to LNNotificationsUI!"];
notification.title = @"Hello World!";
notification.soundName = @"demo.aiff";
notification.defaultAction = [LNNotificationAction actionWithTitle:@"Default Action" handler:^(LNNotificationAction *action) {
	//Handle default action
}];
notification.otherActions = @[[LNNotificationAction actionWithTitle:@"Other Action 1" handler:^(LNNotificationAction *action) {
	//Handle other action here
}], [LNNotificationAction actionWithTitle:@"Other Action 2" handler:^(LNNotificationAction *action) {
	//Handle other action here
}]];

Note: Currently, other actions are only available when notifications are presented as alerts. Tapping on banner notifications will call the default action handler.

Settings

To display the notification settings view controller, create an instance of LNNotificationSettingsController, either in code or storyboard and present it. This view controller will display all registered sub-applications, and will allow the user to select how notifications are presented to him. If only one sub-application is registered, its settings will appear in this view controller. If there two or more sub-applications registered, a list containing each sub-application will appear and and the user will be able to select modify settings seperately for each sub-application.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].