ZCAlertSheetView.h 902 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // JWAlertSheetView.h
  3. // JWlive
  4. //
  5. // Created by 蒋理智 on 16/3/25.
  6. // Copyright © 2016年 pican zhang. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef void(^handleBlock)(void);
  10. @interface ZCAlertAction : NSObject
  11. @property (nonatomic,copy)handleBlock block;
  12. @property (nonatomic,copy)NSString *title;
  13. + (ZCAlertAction *)actionWithTitle:(NSString *)title andblock:(handleBlock)block;
  14. @end
  15. @interface ZCAlertSheetView : UIView
  16. @property(nonatomic,strong)UIWindow* alertWindow;
  17. //这里只需要设置好每个JWAlertAction的action再以block回调过去就可以了,调价到arr数组中
  18. - (id)initWithTitle:(NSString *)title andShowCancelButton:(BOOL)show andAction:(NSArray<ZCAlertAction *> *)arr;
  19. - (id)initWithAttrbuteTitle:(NSAttributedString *)attrbuteTitle andShowCancelButton:(BOOL)show andAction:(NSArray<ZCAlertAction *> *)arr;
  20. - (void)show;
  21. - (void)hide;
  22. @end