源码简介
demo可以提供多种多样的状态栏提示效果,可以控制状态提示从4个方向的进出,并有柔和或弹跳的效果,可以自定义提示内容。
源码运行截图
\
源码片段:
- - (IBAction)btnShowNotificationPressed:(UIButton *)sender {
- [CRToastManager showNotificationWithOptions:[self options]
- apperanceBlock:^(void) {
- NSLog(@"Appeared");
- }
- completionBlock:^(void) {
- NSLog(@"Completed");
- }];
- }
- - (IBAction)btnPrintIdentifiersPressed:(UIButton *)sender {
- NSLog(@"%@", [CRToastManager notificationIdentifiersInQueue]);
- }
- - (IBAction)btnDismissNotificationPressed:(UIButton *)sender {
- [CRToastManager dismissNotification:YES];
- }
- CRToastAnimationType CRToastAnimationTypeFromSegmentedControl(UISegmentedControl *segmentedControl) {
- return segmentedControl.selectedSegmentIndex == 0 ? CRToastAnimationTypeLinear :
- segmentedControl.selectedSegmentIndex == 1 ? CRToastAnimationTypeSpring :
- CRToastAnimationTypeGravity;
- }
源码链接:http://down.51cto.com/data/1983082