[IOS消息提醒]--- DMRNotificationView
2013-04-17 20:12
288 查看
https://github.com/tursunovic/DMRNotificationView
![](https://a248.e.akamai.net/camo.github.com/3811b7b5f3dd750c0f375e39808835cbf738ef42/687474703a2f2f62617363617273696a612e73332e616d617a6f6e6177732e636f6d2f646d726e6f74696669636174696f6e766965772e706e67)
your project
You can use the default initialiser for advanced usage.
Title can only be one line, no support for long titles
DMRNotificationView
DMRNotificationView is a simple panel that slides down to inform the user about something. It has a title and subtitle (optional). You can set custom tint colors (automatically adds 0.85 transparency to tint color), fonts and dismiss interval.Installation
Add theDMRNotificationView.h+
DMRNotificationView.mto
your project
Usage
Usage is pretty self-explanatory if you check the demo. DMRNotificationView can be used in different ways. It comes with a few convenience initializers which allow you to present the panel in one line of code. See the header file for more methods.// The most basic method. [DMRNotificationView showInView:self.view title:@"Simple notification" subTitle:@"This method allows you to quickly show a notification panel."]; // Use a similar method to show a warning [DMRNotificationView showWarningInView:self.view title:@"Warning!" subTitle:@"Simple method to quickly show a warning"];
You can use the default initialiser for advanced usage.
// Create a new DMRNotificationView instance with the default initializer DMRNotificationView *notificationView = [[DMRNotificationView alloc] initWithTitle:@"Some title" subTitle:@"Some subtitle" targetView:self.view]; // Customise fonts [notificationView setTitleFont:[UIFont fontWithName:@"MarkerFelt-Thin" size:20.0]]; [notificationView setSubTitleFont:[UIFont fontWithName:@"MarkerFelt-Thin" size:13.0]]; // Customise the time interval which causes the panel to dismiss. Set to 0.0 to disable auto dismiss [notificationView setHideTimeInterval:6.0]; // Set a custom tint color. If tint color is bright, the text will be dark, otherwise white. Tint color can't be clearColor or nil [notificationView setTintColor:[UIColor greenColor]]; // Optionally disable transparency [notificationView setIsTransparent:NO]; [notificationView setDidTapHandler:^() { // be notified when user taps on panel }]; [notificationView showAnimated:YES];
Issues
Layout issue when changing interface orientationTitle can only be one line, no support for long titles
相关文章推荐
- [IOS 消息提醒]--状态栏FDStatusBarNotifierView
- IOS下本地消息提醒UILocalNotification
- [IOS消息提醒]--CMNavBarNotificationView
- [IOS消息提醒]---MPNotificationView
- iOS给Navigation的BarButton的加消息提醒角标
- Viewbadger消息提醒的实现
- iOS中消息传递机制(KVO,Notification,delegation,block,Target-Action)
- GitHub控件之BadgeView(数字提醒) android 未读消息红点
- 原生NavigationView菜单中添加消息提醒(小红点)
- 使用TextView实现消息提醒(徽章控件)
- iOS知识树,知识目录(包括对象、Block、消息转发、GCD、运行时、runloop、动画、Push、KVO、tableview,UIViewController、提交AppStore)
- iOS-在SAE使用Apple Push Notification Service实现消息推送
- 【转来的精】iOS知识树,知识目录(包括对象、Block、消息转发、GCD、运行时、runloop、动画、Push、KVO、tableview,UIViewController、提交AppStore)
- iOS UILocalNotification定时提醒
- iOS 中的BadgeView(推送消息的那个圆形图标)
- [ios] UILocalNotification实现本地的闹钟提醒【转】
- 【转】iOS知识树,知识目录(包括对象、Block、消息转发、GCD、运行时、runloop、动画、Push、KVO、tableview,UIViewController、提交AppStore)
- 开源中国iOS客户端学习——(四)GCDiscreetNotificationView提示视图
- notification..消息提醒,有震动提醒效果
- iOS开发-OC之知识树,知识点(包括对象、Block、消息转发、GCD、运行时、runloop、动画、Push、KVO、tableview,UIViewController、提交AppStore)