HaidoraAlertViewManager 0.1.1

HaidoraAlertViewManager 0.1.1

Maintained by Mrdaios.



  • By
  • liaowei

HaidoraAlertViewManager

Version License Platform

Usage

统一弹出框API.替换[XXXAlertView alert]

使用如下

//弹出message
+ (void)alertWithMessage:(NSString *)message;
//弹出title和message
+ (void)alertWithTitle:(NSString *)title message:(NSString *)message;
//弹出title、message、cancelTitle
+ (void)alertWithTitle:(NSString *)title
               message:(NSString *)message
           cancelTitle:(NSString *)cancelTitle;
//弹出title、message和多个按钮
+ (void)alertWithTitle:(NSString *)title
               message:(NSString *)message
           clickAction:(void (^)(id alertView, NSInteger index))clickAction
           cancelTitle:(NSString *)cancelTitle
     otherButtonTitles:(NSString *)buttonTitle, ... NS_REQUIRES_NIL_TERMINATION;
//弹出error
+ (void)alertWithError:(NSError *)error;

自定义弹出框样式

//1.实现HaidoraAlertViewProtocol
@interface XXXAlertView <HaidoraAlertViewProtocol>

@end
//2.配置弹出框
[HDAlertViewManager setAlertViewClass:[XXXAlertView class]];

Installation

HaidoraAlertViewManager is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "HaidoraAlertViewManager"

Author

liaowei, [email protected]

License

HaidoraAlertViewManager is available under the MIT license. See the LICENSE file for more info.