[IOS消息提醒]--CMNavBarNotificationView
2013-04-17 20:15
363 查看
https://github.com/edgurgel/CMNavBarNotificationView
4.3 and above.
Provides two
an
Simple API
Enqueues multiple notifications and shows them with a default duration of 2 seconds.
![](https://a248.e.akamai.net/camo.github.com/abc289e3a21a447518bf8490edb1a590e2594216/687474703a2f2f646c2e64726f70626f782e636f6d2f752f313132383031372f434d4e6f74696669636174696f6e56696577546573742e706e67)
Or use the following call to add a thumbnail image and customize duration:
Or if you need to load the image async using
If you would like to set a background image:
Touch handling can be implemented using blocks:
Also by specifying a delegate which implements the
finally by handling the
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.
CMNavBarNotificationView
An in-app notification view above the navigation bar "TOTALLY" based on MPNotificationView. Compatible with iOS4.3 and above.
Features:
Animation and layout similar to iOS 6 notificationsProvides two
UILabelsand
an
UIImageView
Simple API
Enqueues multiple notifications and shows them with a default duration of 2 seconds.
Screenshot:
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
CMNavBarNotificationViewDelegateand
finally by handling the
kCMNavBarNotificationViewTapReceivedNotificationnotification.
Thanks:
Thanks to ekurutepe for the MPNotificationView project. This is totally based on it.License:
Copyright (c) 2013 Eduardo Pinho - Codeminer42Permission 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.
相关文章推荐
- [IOS 消息提醒]--状态栏FDStatusBarNotifierView
- [IOS消息提醒]--- DMRNotificationView
- [IOS消息提醒]---MPNotificationView
- 原生NavigationView菜单中添加消息提醒(小红点)
- iOS开发-OC之知识树,知识点(包括对象、Block、消息转发、GCD、运行时、runloop、动画、Push、KVO、tableview,UIViewController、提交AppStore)
- [IOS]消息提醒--TSMessages
- 【转来的精】iOS知识树,知识目录(包括对象、Block、消息转发、GCD、运行时、runloop、动画、Push、KVO、tableview,UIViewController、提交AppStore)
- iOS: 教你给 UI 控件添加 Badge(消息提醒小圆点)
- [IOS 消息提醒]--状态条上提醒信息- WTStatusBar
- iOS 在imageview中添加按钮 并能响应消息 响应者链条
- 【Android】viewbadger实现未读消息红点提醒,并显示条数
- 安卓数字消息提醒、角标-测试BadgeView效果
- iOS 中的BadgeView(推送消息的那个圆形图标)
- 原生NavigationView菜单中添加消息提醒(小红点)
- iOS给Navigation的BarButton的加消息提醒角标
- GitHub控件之BadgeView(数字提醒) android 未读消息红点
- [原]GitHub控件之BadgeView(类似QQ消息数字提醒)
- Viewbadger消息提醒的实现
- iOS知识树,知识目录(包括对象、Block、消息转发、GCD、运行时、runloop、动画、Push、KVO、tableview,UIViewController、提交AppStore)
- [IOS 消息提醒]--网络或操作的成功失败提醒AJNotificationView