GithubHelp home page GithubHelp logo

jusophos / nnotification Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 2.0 172 KB

nNofitication is an iOS class to show a message for a spefic time. It is very useful to inform the user about something quickly. Inspired by Toast from Android.

Objective-C 100.00%

nnotification's Introduction

nNotification

Overview

  • Author: Richard Jung
  • Version: 1.1
  • State: Beta

About

nNotification is an iOS class to show a message for a specific time. It is very easy to use and a elegant way to inform the user about any information.

Inspired by Toast from Android.

Requirements

  • iOS 4.X
  • UIKit
  • Foundation
  • QuarzCore

Install

  1. Drag the files (nNotification.h, nNotification.m) into your Project or add it through the "Add Files to XXX ...".
  2. Add QuartzCore framework to your project: Click on your project, choose your target, click on "Build Phases", choose "Link Binary With Libraries" and add it via "+".
  3. Import it where do you want to use it:

#import "nNotification.h"

Usage

Simple use

[nNotification showMessage:@"Your message!"];

Extended use

nNotificaiton *notification = [nNotification 	notificationWithMessage:@"Your Message"];
notification.width = 200;
notification.height = 200;
notification.modal = YES;
notification.delay = 3;
notification.duration = 5;
[notification show];

// And you can customize UI
nNotification *notification = [nNotification 	notificationWithMessage:@"Your Message"];

nNotificationExtended extended = notification.extended;
extended.modalBackgroundColor = [UIColor yellowColor];
extended.dialogBackgroundColor = [UIColor redColor];
notification.extended = extended;

[notification show];

Dokumentation

Options

message: Defines the shown message.

notification.message = @"Your Message!";

duration: Defines how long (time -> seconds) the dialog will be shown. Default is 2.5 seconds.

notification.duration = 4.0;

width: Defines the width of the shown message dialog.

notification.width = 200;

height: Defines the height of the shown message dialog.

notification.height = 200;

delay: Defines after which delay (time -> seconds) the dialog appears. So you can hold back the dialog a specific time.

notification.delay = 4;

modal: Defines whether the user is allowed to interact with the UI or not. Additionally the whole window will be dimmed.

notification.modal = YES;

extended: Is a struct object, which allows to customize the ui of the dialog.

nNotificationExtended extended = notification.extended;

Extended

modalBackgroundColor: [JUST FOR MODAL] Defines the dimming color.

extended.modalBackgroundColor = [UIColor redColor];

dialogBackgroundColor: Defines the background color of the dialog layer.

extended.dialogBackgroundColor = [UIColor yellowColor];

Copyright

(2011) Copyright by Richard Jung. All rights reserved.

License

This software / classes are released under the LGPL conditions. Feel free to use it for commercial purposes.

nnotification's People

Contributors

jusophos avatar

Stargazers

deviosxi avatar jprothwell avatar  avatar

Watchers

 avatar James Cloos avatar

Forkers

q200981193

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.