AFEAlertView.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // AFEAlertView.h
  3. // BioAuthEngine
  4. //
  5. // Created by shuhong.xsh on 16/8/3.
  6. // Copyright © 2016年 DTF. All rights reserved.
  7. // 弹出框管理类
  8. #import <UIKit/UIKit.h>
  9. typedef void (^AFEAlertClickBlock) ();
  10. @interface AFEAlertView : NSObject
  11. @property(atomic, assign) BOOL isAlertViewShow;
  12. +(AFEAlertView*) sharedInstance;
  13. /**
  14. * 当前alert是否显示
  15. */
  16. - (BOOL)isAlertViewShow;
  17. /**
  18. * 显示alert
  19. *
  20. * @param title 标题
  21. * @param msg 提示信息
  22. * @param firstTitle 第一个按钮提示文案(不可为空)
  23. * @param secondTitle 第二课提示文案(可为空)
  24. * @param fblk 第一个按钮点击事件callback(不可为空)
  25. * @param sblk 第二个按钮点击事件callback(可为空)
  26. */
  27. - (void)displayAlertViewWithTitle:(NSString *)title
  28. message:(NSString*)msg
  29. firstButtonTitle:(NSString *)firstTitle
  30. secondBittonTitle:(NSString *)secondTitle
  31. firstCallBack:(AFEAlertClickBlock)fblk
  32. secondCallBack:(AFEAlertClickBlock)sblk
  33. withVC:(UIViewController*)parentViewController;
  34. /**
  35. * 活体失败
  36. *
  37. */
  38. - (void)displayLivnessFailAlertView:(NSString *)title
  39. tips:(NSString*)tip
  40. cancleTip:(NSString *)cancelTips
  41. retryTip:(NSString *)retryTips
  42. withCancelCallBack:(AFEAlertClickBlock)cancel
  43. retryCallBack:(AFEAlertClickBlock)retry
  44. withVC:(UIViewController*)parentViewController;
  45. /**
  46. * 展示浮层提示框
  47. * @param superview 父view
  48. * @param title 主文案,只能显示一行
  49. * @param detailTitle 副文案,最多显示两行
  50. * @param cancelTips 取消按钮文本
  51. * @param retryTips 再试一次按钮文本
  52. */
  53. - (void)displayCameraPermissionAlert:(UIViewController *)parentViewController
  54. title:(NSString *)title
  55. detailTitle:(NSString *)detailTitle
  56. cancleTip:(NSString *)cancelTips
  57. retryTip:(NSString *)retryTips
  58. cancelCallBack:(AFEAlertClickBlock)cancelCall
  59. setCallBack:(AFEAlertClickBlock)setCall;
  60. // 判断最顶层视图是否是 APBAlertViewController
  61. - (BOOL)isAPBAlertViewController;
  62. - (UIViewController *)currentViewController;
  63. @end