[IOS消息提醒]---MPNotificationView
来源:互联网 发布:知豆山东生产基地 编辑:程序博客网 时间:2024/05/21 16:57
https://github.com/Moped/MPNotificationView
MPNotificationView
An in-app notification view that mimics the iOS 6 notification views which appear above the status bar. Compatible with iOS 4.3 and above.
Features:
- Animation and layout similar to iOS 6 notifications
- Provides two
UILabels
and anUIImageView
- 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:
[MPNotificationView notifyWithText:@"Grumpy wizards" andDetail:@"make a toxic brew for the jovial queen"];`
Or use the following call to add a thumbnail image and customize duration:
[MPNotificationView 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
:
MPNotificationView* notification = [MPNotificationView 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"]];
Touch handling can be implemented using blocks:
[MPNotificationView notifyWithText:@"Grumpy wizards" detail:@"make a toxic brew for the jovial queen" andTouchBlock:^(MPNotificationView *notificationView) { NSLog( @"Received touch for notification with text: %@", notificationView.textLabel.text ); }];
Also by specifying a delegate which implements the MPNotificationViewDelegate
and finally by handling thekMPNotificationViewTapReceivedNotification
notification.
Contact:
Developed by Engin Kurutepe at Moped in Berlin
Follow us on twitter: @moped
Thanks:
Thanks to kovpas for his amazing contributions, including but not limited to proper iPad support.
Also stole some ideas from BWStatusOverlay by Bruno Wernimont. Thanks.
License:
Copyright (c) 2013 Engin Kurutepe - Moped Inc.
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.
- [IOS消息提醒]---MPNotificationView
- [IOS]消息提醒--TSMessages
- [IOS消息提醒]--- DMRNotificationView
- [IOS消息提醒]--CMNavBarNotificationView
- [IOS 消息提醒]--状态栏FDStatusBarNotifierView
- [IOS 消息提醒]--状态条上提醒信息- WTStatusBar
- IOS下本地消息提醒UILocalNotification
- iOS关于聊天消息提醒铃声
- [IOS 消息提醒]--网络或操作的成功失败提醒AJNotificationView
- ios 提醒功能开发(应用后台运行消息提醒推送)
- 消息到达提醒功能
- [iIOS 消息提醒]--KGDiscreetAlertView
- 消息与提醒
- 添加本地消息提醒
- 未读消息提醒
- 消息提醒显示
- Notification消息提醒
- Android消息提醒
- Cow Sorting(DP之—置换群)
- 第七周项目1 时间累
- 字符串循环右移(一道面试题的代码实现)
- hdoj_1342Lotto
- 类的inline函数
- [IOS消息提醒]---MPNotificationView
- windows下cygwin获取root权限-1
- 第7周任务3:友元类
- Step By Step(C++模板目录)
- spring mvc基本配置
- jquery动画-fadeIn()
- 关于mnt/sdcard一直不能写入的问题
- 关于集合带泛型的反射
- dijkstral 算法