MessageAlert.h.svn-base 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // MessageAlert.h
  3. // XFilesPro
  4. //
  5. // Created by 青秀斌 on 14-8-15.
  6. // Copyright (c) 2014年 深圳元度科技有限公司. All rights reserved.
  7. //
  8. #import "BSAlertView.h"
  9. @class MessageAlert;
  10. typedef MessageAlert * (^AlertBlockF)(NSString *format,...);
  11. typedef MessageAlert * (^AlertBlockT)(NSString *placeholder, NSString *text);
  12. typedef MessageAlert * (^AlertBlockB)(NSString *title, void (^action)(MessageAlert *));
  13. typedef MessageAlert * (^AlertBlockA)(AlertAnimation animation);
  14. typedef MessageAlert * (^AlertBlockH)(NSString *placeholder, NSString *text, NSString *unit);
  15. typedef MessageAlert * (^AlertBlockG)(NSString *placeholder, NSString *text);
  16. @interface MessageAlert : BSAlertView
  17. @property (nonatomic, readonly) UILabel *titleLabel;
  18. @property (nonatomic, readonly) UILabel *messageLabel;
  19. @property (nonatomic, readonly) AlertBlockF setTitle;
  20. @property (nonatomic, readonly) AlertBlockF setMessage;
  21. @property (nonatomic, readonly) AlertBlockT addTextField;
  22. @property (nonatomic, readonly) AlertBlockH addTextFieldTwo;
  23. @property (nonatomic, readonly) AlertBlockB addRedButton;
  24. @property (nonatomic, readonly) AlertBlockB addBlueButton;
  25. @property (nonatomic, readonly) AlertBlockA showAlert;
  26. @property (nonatomic, readonly) AlertBlockA dismissAlert;
  27. + (instancetype)alert;
  28. - (UITextField *)textFieldAtIndex:(NSUInteger)index;
  29. - (UIButton *)buttonAtIndex:(NSUInteger)index;
  30. @end