口袋优选

DXAlertView.h 857B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // DXAlertView.h
  3. // Elephant
  4. //
  5. // Created by dyy on 2018/1/19.
  6. // Copyright © 2018年 dyy. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class DXAlertView;
  10. @protocol DXAlertViewDelegate <NSObject>
  11. @optional
  12. - (void)dxAlertView:(DXAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;
  13. @end;
  14. typedef void (^clickBlock) (NSInteger);
  15. @interface DXAlertView : UIView
  16. @property (nonatomic,weak)id<DXAlertViewDelegate>delegate;
  17. @property (nonatomic, copy) clickBlock clickBlock;
  18. /**
  19. 初始化Alertview
  20. @param title 标题
  21. @param message 内容
  22. @param cancelTitle 取消按钮
  23. @param otherBtnTitle 确定按钮
  24. @return <#return value description#>
  25. */
  26. -(instancetype)initWithTitle:(NSString *)title message:(NSString *)message cancelBtnTitle:(NSString *)cancelTitle otherBtnTitle:(NSString *)otherBtnTitle;
  27. -(void)show;
  28. @end