LZAlertWindow.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // LZAlertWindow.h
  3. // VQU
  4. //
  5. // Created by CY on 2021/4/23.
  6. // Copyright © 2021 leo. All rights reserved.
  7. //
  8. #import "ZYBaseWindow.h"
  9. @interface LZAlertAction : NSObject
  10. @property (nonatomic,strong) NSString *title;
  11. @property (nonatomic,strong) UIColor *bgColor;
  12. @property (nonatomic,assign) CGFloat cornerRadius;
  13. @property (nonatomic,strong) UIColor *color;
  14. @property (nonatomic,strong) UIFont *font;
  15. @property (nonatomic,copy) void (^handler)(LZAlertAction *action);
  16. + (instancetype)actionWithTitle:(NSString *)title handler:(void (^)(LZAlertAction *action))handler;
  17. - (instancetype)initWithTitle:(NSString *)title handler:(void (^)(LZAlertAction *action))handler;
  18. @end
  19. @interface LZAlertWindow : ZYBaseWindow
  20. @property (nonatomic,strong) NSString *zTitle;
  21. @property (nonatomic,strong) NSString *content;
  22. @property (nonatomic,strong) NSArray<LZAlertAction *> *actions;
  23. @property (nonatomic,strong) UIColor *bgColor;
  24. @property (nonatomic,assign) CGFloat cornerRadius;
  25. @property (nonatomic,strong) UIColor *titleColor;
  26. @property (nonatomic,strong) UIFont *titleFont;
  27. @property (nonatomic,strong) UIColor *contentColor;
  28. @property (nonatomic,strong) UIFont *contentFont;
  29. @property (nonatomic,assign) CGFloat contentHorizontalSpace;
  30. @property (nonatomic,assign) NSTextAlignment contentTextAlignment;
  31. + (instancetype)alertWithTitle:(NSString *)title content:(NSString *)content action:(NSArray <LZAlertAction *>*)actions;
  32. - (instancetype)initWithTitle:(NSString *)title content:(NSString *)content action:(NSArray<LZAlertAction *> *)actions;
  33. + (instancetype)alertWithTitle:(NSString *)title content:(NSString *)content action:(NSArray <LZAlertAction *>*)actions contentStyleBlock:(void (^)(UILabel *contentL))contentStyleBlock;
  34. - (instancetype)initWithTitle:(NSString *)title content:(NSString *)content action:(NSArray<LZAlertAction *> *)actions contentStyleBlock:(void (^)(UILabel *contentL))contentStyleBlock;;
  35. @end