Giter Site home page Giter Site logo

williamren / cnusernotification Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uikit0/cnusernotification

0.0 2.0 0.0 1.2 MB

CNUserNotification is a kind of proxy to give OS X Lion 10.7 „the same‟ support for user notifications like OS X Mountain Lion 10.8 does. Benefits are also a bit more flexibility since you are able to define a custom banner image or variable dismiss delay times.

cnusernotification's Introduction

##Overview CNUserNotification is a kind of proxy to give OS X Lion 10.7 „the same‟ support for user notifications like OS X Mountain Lion 10.8 does. Benefits are also a bit more flexibility since you are able to define a custom banner image or variable dismiss delay times. CNUserNotification uses a fake notification center that runs just per application. The class design and all method signatures are similar to their counterparts of NSUserNotification.

It's not necessary to install Growl or other third party libraries. It's all build in to get the user notified - Mountain Lion style.

As of CNUserNotification runs on a per application basis all methods related to scheduled or remote deliverey are not implemented. Please take a look at the documentation to get a detailed look.

Here is a screenshot of the included example application:

CNUserNotification Example

##Installation ####Via CocoaPods Just add pod 'CNUserNotification' to your podfile.

####Via Git SubModule cd into your project directory and execute git submodule add https://github.com/phranck/CNUserNotification.git $DIR_WHERE_YOUR_SUBMODULES_ARE_PLACED

You have to replace the $DIR_WHERE_YOUR_SUBMODULES_ARE_PLACED with the real path where your submodules are placed.

##Usage As described above all method signatures are identical to that ones of CNUserNotification* classes. Strictly speaking you have to use three classes and one delegate:

CNUserNotification
CNUserNotificationCenter
CNUserNotificationFeature
CNUserNotificationDelegate

That's all. CNUserNotificationFeature is the extension that doesn't exist in the original NSUserNotification, but there is a category to implement just two accessor methods.

The only thing you have to do is to replace the prefix NS by CN. It's not required to change any code if you use CNUserNotification. It decides by itself whether to use NSNotfication or this custom implementation.

##Requirements CNUserNotification was written using ARC and runs on 10.7 and above. It requires the QuartzCore Framework.

##Contribution The code is provided as-is, and it is far off being complete or free of bugs. If you like this component feel free to support it. Make changes related to your needs, extend it or just use it in your own project. Feedbacks are very welcome. Just contact me at [[email protected]](mailto:[email protected]?Subject=[CNUserNotification] Your component on Github), send me a ping on Twitter @TheCocoaNaut or App.net @phranck.

##Documentation The documentation of this project is auto generated using Appledoc by @gentlebytes.
You can find the complete reference here.

##License This software is published under the MIT License.

cnusernotification's People

Watchers

william avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.