• This repository has been archived on 28/Jul/2020
  • Stars
    star
    124
  • Rank 277,974 (Top 6 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 11 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[unmaintained] An in-app notification view above the navigation bar "totally" based on MPNotificationView

CMNavBarNotificationView

An in-app notification view above the navigation bar "TOTALLY" based on MPNotificationView. Compatible with iOS 4.3 and above.

Features:

  • Animation and layout similar to iOS 6 notifications
  • Provides two UILabels and an UIImageView
  • Simple API
  • Enqueues multiple notifications and shows them with a default duration of 2 seconds.

Live:

Example

Usage:

Simply use the following call to show a message and related detail text:

[CMNavBarNotificationView notifyWithText:@"Grumpy wizards" andDetail:@"make a toxic brew"];`

Or use the following call to add a thumbnail image and customize duration:

[CMNavBarNotificationView notifyWithText:@"Moped Dog:"
                        detail:@"I have no idea what I'm doing..."
                         image:[UIImage imageNamed:@"mopedDog.jpeg"]
                   andDuration:5.0];

Or if you need to load the image async using AFNetworking:

CMNavBarNotificationView* notification =
[CMNavBarNotificationView notifyWithText:@"Moped Dog:"
                        detail:@"I have no idea what I'm doing..."
                         image:nil
                   andDuration:5.0];

//From UIImage+AFNetworking.h:
[notification.imageView setImageWithURL:[NSURL URLWithString:@"https://dl.dropbox.com/u/361895/mopeddog.png"]];

If you would like to set a background image:

[CMNavBarNotificationView setBackgroundImage:[UIImage imageNamed:@"aImage"]];
[CMNavBarNotificationView notifyWithText:@"Moped Dog:"
                        detail:@"I have no idea what I'm doing..."
                         image:nil
                   andDuration:5.0];

Touch handling can be implemented using blocks:

[CMNavBarNotificationView notifyWithText:@"Grumpy wizards"
                        detail:@"make a toxic brew for the jovial queen"
                 andTouchBlock:^(CMNavBarNotificationView *notificationView) {
                     NSLog( @"Received touch for notification with text: %@", notificationView.textLabel.text );
}];

Also by specifying a delegate which implements the CMNavBarNotificationViewDelegate and finally by handling the kCMNavBarNotificationViewTapReceivedNotification notification.

Thanks:

Thanks to ekurutepe for the MPNotificationView project. This is totally based on it.

License:

Copyright (c) 2013 Eduardo Pinho - Codeminer42

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

httpoison

Yet Another HTTP client for Elixir powered by hackney
Elixir
2,199
star
2

poxa

Pusher server implementation compatible with Pusher client libraries.
Elixir
1,023
star
3

verk

A job processing system that just verks! πŸ§›β€
Elixir
719
star
4

tentacat

Simple Elixir wrapper for the GitHub API
Elixir
436
star
5

mimic

A mocking library for Elixir
Elixir
302
star
6

solid

Liquid template engine in Elixir
Elixir
188
star
7

httparrot

HTTP Request & Response Server. An incomplete clone of http://httpbin.org
Elixir
85
star
8

verk_web

A dashboard for the job processing system that just verks! πŸ§›β€
JavaScript
81
star
9

bertex

Elixir BERT encoder/decoder
Elixir
30
star
10

poxa-erlang

Open Pusher server implementation compatible with Pusher libraries.
Erlang
26
star
11

pusher

Elixir library to access the Pusher REST API.
Elixir
25
star
12

signaturex

Simple key/secret based authentication for APIs
Elixir
23
star
13

riex

[OLD] Riak & Elixir in a pool
Elixir
23
star
14

tldr_elixir_client

Elixir command line client for tldr
Elixir
15
star
15

wth

WTH is a command line tool much like old WTF that searchs on Urban Dictionary for a term definition.
Elixir
15
star
16

httpehaviour

Yet yet another HTTP client. This time using Behaviour
Elixir
14
star
17

watcher

GenEvent Watcher
Elixir
13
star
18

bertrpcex

A pool of BERT-RPC clients built on top of poolboy
Elixir
12
star
19

CMSignals

Qt Signals and Slots clone to Objective-C.
Objective-C
12
star
20

pusher_client

A websocket client to work with Pusher
Elixir
10
star
21

verk-stats

Verk Stats πŸ§›β€πŸ“Š
Elixir
4
star
22

bertrpc

A pool of BERT-RPC clients build on top of poolboy.
Erlang
3
star
23

defpool

Elixir macro to use pooler on a clean way
Elixir
2
star
24

compiz-plugins-ideas

Some ideas for new compiz plugins
C
1
star