[iIOS 消息提醒]--KGDiscreetAlertView
2013-04-17 20:45
381 查看
https://github.com/kgn/KGDiscreetAlertView
that allows you to display a discreet alert in any view.
![](https://raw.github.com/kgn/KGDiscreetAlertView/master/example.gif)
You supply your own text and
the rest to properly fit the text in the discreet alert and animate it down from the top of the specified view:
There are a couple other options but it's purposely designed to be simple and easy to use:
Check out the ExampleApp to see it in action!
KGDiscreetAlertViewis an easy drop in control
that allows you to display a discreet alert in any view.
![](https://raw.github.com/kgn/KGDiscreetAlertView/master/example.gif)
You supply your own text and
KGDiscreetAlertViewdoes
the rest to properly fit the text in the discreet alert and animate it down from the top of the specified view:
[KGDiscreetAlertView showDiscreetAlertWithText:@"KGDiscreetAlertView, add discreet alerts to any view!" inView:self.view];
There are a couple other options but it's purposely designed to be simple and easy to use:
#pragma mark - Convenience Class Methods // Show a discreet alert with the given text in a view, // the alert will be automatically dismissed after 3 seconds. + (id)showDiscreetAlertWithText:(NSString *)text inView:(UIView *)view; // Show a discreet alert with the given text in a view, // the alert will be automatically dismissed after the specified delay. // If the delay is 0 the alert will be 'sticky' and will not be dismissed until `hide` is called. + (id)showDiscreetAlertWithText:(NSString *)text inView:(UIView *)view delay:(NSTimeInterval)delay; // Show a discreet alert with the given text in a view, and a max width for the alert. // The alert will be automaticly dismissed after the specified delay, // if the delay is 0 the alert will be 'sticky' and will not be dismissed until `hide` is called. + (id)showDiscreetAlertWithText:(NSString *)text inView:(UIView *)view maxWidth:(CGFloat)maxWidth delay:(NSTimeInterval)delay; #pragma mark - Instance Methods // Show a discreet alert with the given text in a view, // the alert will be automatically dismissed after 3 seconds. - (void)showWithText:(NSString *)text inView:(UIView *)view; // Show a discreet alert with the given text in a view, // the alert will be automatically dismissed after the specified delay. // If the delay is 0 the alert will be 'sticky' and will not be dismissed until `hide` is called. - (void)showWithText:(NSString *)text inView:(UIView *)view delay:(NSTimeInterval)delay; // Show a discreet alert with the given text in a view, and a max width for the alert. // The alert will be automatically dismissed after the specified delay, // if the delay is 0 the alert will be 'sticky' and will not be dismissed until `hide` is called. - (void)showWithText:(NSString *)text inView:(UIView *)view maxWidth:(CGFloat)maxWidth delay:(NSTimeInterval)delay; // Dismiss the discreet alert. - (void)hide;
Check out the ExampleApp to see it in action!
相关文章推荐
- KGDiscreetAlertView
- KGDiscreetAlertView
- GitHub控件之BadgeView(数字提醒) android 未读消息红点
- 高仿微信5.2.1主界面及消息提醒(fragment+viewPager+BadgeView)
- GitHub控件之BadgeView(消息提醒的红点)
- 【Android】viewbadger实现未读消息红点提醒,并显示条数
- 原生NavigationView菜单中添加消息提醒(小红点)
- [IOS消息提醒]--- DMRNotificationView
- Viewbadger消息提醒的实现
- 原生NavigationView菜单中添加消息提醒(小红点)
- [IOS消息提醒]--CMNavBarNotificationView
- Gnome增加消息提醒extension 适用于聊天工具如xchat "message notifier" "notifications alert" "permanent notification"
- Android Fragment + ViewPager 实现类微信 底部导航栏 和 显示消息提醒
- [IOS消息提醒]---MPNotificationView
- [原]GitHub控件之BadgeView(类似QQ消息数字提醒)
- 使用TextView实现消息提醒(徽章控件)
- 安卓数字消息提醒、角标-测试BadgeView效果
- Android UI 新消息提醒_BadgeView Plus
- 信息提醒:AlertView和UIAlertController
- GitHub控件之BadgeView(数字提醒) android 未读消息红点