NewNotifier.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. //
  2. // NewNotifier.h
  3. // MingMen
  4. //
  5. // Created by 罗云飞 on 2017/3/26.
  6. // Copyright © 2017年 罗云飞. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. #import "NewNotifierBar.h"
  11. @interface NewNotifier : NSObject
  12. + (NewNotifier*)shareInstance;
  13. /**
  14. * 显示一个Notifer,需要手动点击关闭
  15. *
  16. * @param note Notifer 内容
  17. *
  18. * @return NewNotifierBar
  19. */
  20. + (NewNotifierBar*)showNotiferRemain:(NSString*)note;
  21. /**
  22. * 显示一个Notifer,需要手动点击关闭
  23. *
  24. * @param note Notifer 内容
  25. * @param appName Notifer 自定义APP名称 默认读取CFBundleName
  26. *
  27. * @return NewNotifierBar
  28. */
  29. + (NewNotifierBar*)showNotiferRemain:(NSString*)note
  30. name:(NSString*)appName;
  31. /**
  32. * 显示一个Notifer,2秒后自动关闭
  33. *
  34. * @param note Notifer 内容
  35. *
  36. * @return NewNotifierBar
  37. */
  38. + (NewNotifierBar*)showNotifer:(NSString*)note;
  39. /**
  40. * 显示一个Notifer,delay秒后自动关闭
  41. *
  42. * @param note Notifer 内容
  43. * @param delay 自动关闭时间
  44. *
  45. * @return NewNotifierBar
  46. */
  47. + (NewNotifierBar*)showNotifer:(NSString *)note
  48. dismissAfter:(NSTimeInterval)delay;
  49. /**
  50. * 显示一个Notifer,内容,名称,图标
  51. *
  52. * @param note Notifer 内容
  53. * @param appName APP名称
  54. * @param appIcon APP图标
  55. *
  56. * @return NewNotifierBar
  57. */
  58. + (NewNotifierBar*)showNotifer:(NSString*)note
  59. name:(NSString*)appName
  60. icon:(UIImage*)appIcon;
  61. /**
  62. * 显示一个Notifer,内容,名称,图标,关闭时间
  63. *
  64. * @param note Notifer 内容
  65. * @param appName APP名称
  66. * @param appIcon APP图标
  67. * @param delay 自动关闭时间
  68. *
  69. * @return NewNotifierBar
  70. */
  71. + (NewNotifierBar*)showNotifer:(NSString*)note
  72. name:(NSString*)appName
  73. icon:(UIImage*)appIcon
  74. dismissAfter:(NSTimeInterval)delay;
  75. /**
  76. * 关闭Notifer
  77. */
  78. + (void)dismiss;
  79. /**
  80. * 关闭Notifer
  81. */
  82. - (void)dismiss;
  83. /**
  84. * 延迟关闭Notifer
  85. *
  86. * @param delay 延迟关闭时间
  87. */
  88. + (void)dismissAfter:(NSTimeInterval)delay;
  89. /**
  90. * 点击Notifer的回调
  91. *
  92. * @param notifierBarClickBlock 点击Notifer的回调
  93. */
  94. + (void)handleClickAction:(NewNotifierBarClickBlock)notifierBarClickBlock;
  95. @end