CSAlertView.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // CSAlertView.h
  3. // zhuxun
  4. //
  5. // Created by JonathanH on 2017/7/20.
  6. //
  7. //
  8. /**
  9. * e.g initCSAlertView showXBAlertView
  10. * click cancle(removeAlertView delloc self)
  11. * click comfirm disable comfirmBtn start Animation at ActivityIndicatorView()then callblock
  12. *
  13. */
  14. #import <UIKit/UIKit.h>
  15. typedef void(^AlertResult)(NSString *folderName);
  16. @interface CSAlertView : UIView
  17. /**
  18. * 确定按钮执行
  19. */
  20. @property (nonatomic,copy) AlertResult alertresult;
  21. /**
  22. * <#Description#>
  23. *
  24. * @param title title
  25. * @param message message
  26. * @param inputmode YES/NO
  27. * @param sureTitle comfirmtitle
  28. * @param cancleTitle cacletaitle
  29. *
  30. * @return view remember showXBAlertView!
  31. */
  32. - (instancetype)initWithTitle:(NSString *)title message:(NSString *)message inputMode:(BOOL)inputmode sureBtn:(NSString *)sureTitle cancleBtn:(NSString *)cancleTitle;
  33. - (void)showXBAlertView;
  34. /**
  35. * comfirm sucess something stop & remove XBAlertView
  36. */
  37. -(void)stopActityAndRemoveAlertView;
  38. /**
  39. * comfirm geterror
  40. *
  41. * @param errormsg showerr at messagelabel(between title & buttons withRedTextColor)
  42. */
  43. -(void)showErrorMsg:(NSString*)errormsg;
  44. @end