YLBaseAlertView.h 862 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // YLBaseAlertView.h
  3. // mask
  4. //
  5. // Created by 翟玉磊 on 2018/12/27.
  6. // Copyright © 2018 翟玉磊. All rights reserved.
  7. //
  8. /// 此类是自定义alertvView的基础类
  9. /// 使用方式
  10. /*
  11. YLBaseAlertView *alert = [[YLBaseAlertView alloc] init];
  12. UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
  13. [contentView setBackgroundColor:[UIColor greenColor]];
  14. alert.contentView = contentView;
  15. [alert show];
  16. */
  17. #import <UIKit/UIKit.h>
  18. NS_ASSUME_NONNULL_BEGIN
  19. typedef void(^AlertClickBlock)(NSInteger index);
  20. @interface YLBaseAlertView : UIView
  21. @property (strong, nonatomic) UIView *contentView;
  22. /// 是否点击背景隐藏弹窗 默认YES点击隐藏
  23. @property (nonatomic, assign) BOOL clickBackgroundHide;
  24. - (void)show;
  25. - (void)dismiss;
  26. - (void)showBackground;
  27. - (void)showAlertAnimation;
  28. @end
  29. NS_ASSUME_NONNULL_END