Latest 0.1.0
Homepage https://github.com/BlueTopsky/SKYAlertManager
License MIT
Platforms ios 8.0
Authors

UIAlertController的简易封装

系统要求:iOS 8.0以上

pod ‘SKYAlertManager’, ‘~> 0.1.0’

//获取当前最顶层的ViewController
- (UIViewController *)topViewController;

//便捷创建方法(无按钮)
+ (void)showAlertFromViewController:(UIViewController *)viewController Title:(NSString *)title message:(NSString *)message preferredStyle:(UIAlertControllerStyle)style;

//便捷创建方法(只有取消按钮)
+ (void)showAlertFromViewController:(UIViewController *)viewController Title:(NSString *)title message:(NSString *)message preferredStyle:(UIAlertControllerStyle)style cancleTitle:(NSString *)cancleTitle action:(AlertIndexBlock)alertIndexBlock;

//便捷创建方法(没有取消按钮,但有其它按钮)
+ (void)showAlertFromViewController:(UIViewController *)viewController Title:(NSString *)title message:(NSString *)message preferredStyle:(UIAlertControllerStyle)style otherTitles:(NSArray *)otherTitles action:(AlertIndexBlock)alertIndexBlock;

/**
 完整创建方法(有取消按钮和其它按钮)

 @param viewController 推出弹窗的视图控制器,为空则默认为当前最顶层视图控制器
 @param title 标题
 @param message 具体消息
 @param style 弹窗样式
 @param cancleTitle 取消按钮标题
 @param otherTitles 其它按钮标题数组
 @param alertIndexBlock 点击按钮的回调
 */
+ (void)showAlertFromViewController:(UIViewController *)viewController Title:(NSString *)title message:(NSString *)message preferredStyle:(UIAlertControllerStyle)style cancleTitle:(NSString *)cancleTitle otherTitles:(NSArray *)otherTitles action:(AlertIndexBlock)alertIndexBlock;

//退出当前最顶层的AlertController
+ (void)dismissCurrentAlertController;

Latest podspec

{
    "name": "SKYAlertManager",
    "version": "0.1.0",
    "summary": "UIAlertControlleru7684u7b80u6613u5c01u88c5.",
    "description": "UIAlertControlleru7684u7b80u6613u5c01u88c5,u4e00u884cu4ee3u7801u5b8cu6210u8c03u7528",
    "homepage": "https://github.com/BlueTopsky/SKYAlertManager",
    "license": "MIT",
    "authors": {
        "luoyesuifeng": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/BlueTopsky/SKYAlertManager.git",
        "tag": "0.1.0"
    },
    "source_files": "SKYAlertManager/*.{h,m}"
}

Pin It on Pinterest

Share This