RQAlertViewManager.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. // RQAlertViewManager.h
  3. // YJZS
  4. //
  5. // Created by 张嵘 on 2022/4/11.
  6. //
  7. #import <Foundation/Foundation.h>
  8. typedef NS_ENUM(NSUInteger, RQAlertType) {
  9. /// 默认
  10. RQAlertType_Default = 0,
  11. /// 正确
  12. RQAlertType_Rignt = 1,
  13. /// 错误
  14. RQAlertType_Error = 2,
  15. /// 提示
  16. RQAlertType_Warn = 3,
  17. /// 注销账号
  18. RQAlertType_SignOut = 4,
  19. };
  20. NS_ASSUME_NONNULL_BEGIN
  21. #define RQ_ALERT_MANAGER [RQAlertViewManager sharedManager]
  22. @interface RQAlertViewManager : NSObject
  23. + (RQAlertViewManager *)sharedManager;
  24. /**
  25. 弹出alertController,并且有两个个action按钮,分别有处理事件
  26. @param alertType 弹窗类型
  27. @param title title
  28. @param message Message
  29. @param confirmTitle 右边按钮的title
  30. @param cancelTitle 左边按钮的title
  31. @param confirmAction 右边按钮的点击事件
  32. */
  33. - (void)showAlertWithAlertType:(RQAlertType)alertType title:(NSString * _Nullable )title message:(NSString * _Nullable )message confirmTitle:(NSString *)confirmTitle cancelTitle:(NSString * _Nullable )cancelTitle confirmAction:(void (^__nullable)(__kindof QMUIDialogViewController *dialogViewController))confirmAction;
  34. /**
  35. 弹出alertController,并且有两个个action按钮,分别有处理事件
  36. @param alertType 弹窗类型
  37. @param title title
  38. @param message Message
  39. @param confirmTitle 左边按钮的title
  40. @param cancelTitle 右边按钮的title
  41. @param confirmAction 左边按钮的点击事件
  42. @param cancelAction 右按钮的点击事件
  43. */
  44. - (void)showAlertWithAlertType:(RQAlertType)alertType title:(NSString * _Nullable )title message:(NSString * _Nullable )message confirmTitle:(NSString *)confirmTitle cancelTitle:(NSString * _Nullable )cancelTitle confirmAction:(void (^__nullable)(__kindof QMUIDialogViewController *dialogViewController))confirmAction cancelAction:(void (^__nullable)(__kindof QMUIDialogViewController *dialogViewController))cancelAction;
  45. /**
  46. 弹出alertController,并且有三个action按钮
  47. @param confirmOneAction 右边按钮的点击事件
  48. @param confirmTwoAction 右边按钮的点击事件
  49. */
  50. - (void)showAlertWithConfirmOneAction:(void(^)(void))confirmOneAction confirmTwoAction:(void(^)(void))confirmTwoAction;
  51. - (void)showEmailAlertConfirmAction:(void (^__nullable)(__kindof QMUIDialogViewController *dialogViewController, __kindof QMUITextField *textFiled))confirmAction;
  52. @end
  53. NS_ASSUME_NONNULL_END