RCAlertView Class Reference
Inherits from | UIView |
---|---|
Declared in | RCAlertView.h |
+ showAlertController:message:cancelTitle:
显示 AlertController
+ (void)showAlertController:(NSString *)title message:(NSString *)message cancelTitle:(NSString *)cancelTitle
Parameters
title |
title |
---|---|
message |
message |
cancelTitle |
取消 title |
Discussion
显示 AlertController
默认显示在 keyWindow rootViewController 上
Declared In
RCAlertView.h
+ showAlertController:message:cancelTitle:inViewController:
显示 AlertController
+ (void)showAlertController:(NSString *)title message:(NSString *)message cancelTitle:(NSString *)cancelTitle inViewController:(UIViewController *)controller
Parameters
title |
title |
---|---|
message |
message |
cancelTitle |
取消 title |
controller |
AlertController 展示的父类控制器,如果 controller 为 nil,则显示在 keyWindow rootViewController 上 |
Discussion
显示 AlertController
Declared In
RCAlertView.h
+ showAlertController:message:hiddenAfterDelay:
显示 AlertController(可设置自动消失时间)
+ (void)showAlertController:(NSString *)title message:(NSString *)message hiddenAfterDelay:(NSTimeInterval)timeInterval
Parameters
title |
title |
---|---|
message |
message |
timeInterval |
消失时间 |
Discussion
显示 AlertController(可设置自动消失时间)
默认显示在 keyWindow rootViewController 上
Declared In
RCAlertView.h
+ showAlertController:message:hiddenAfterDelay:inViewController:
显示 AlertController(可设置自动消失时间)
+ (void)showAlertController:(NSString *)title message:(NSString *)message hiddenAfterDelay:(NSTimeInterval)timeInterval inViewController:(UIViewController *)controller
Parameters
title |
title |
---|---|
message |
message |
timeInterval |
消失时间 |
controller |
AlertController 展示的父类控制器,如果 controller 为 nil,则显示在 keyWindow rootViewController 上 |
Discussion
显示 AlertController(可设置自动消失时间)
Declared In
RCAlertView.h
+ showAlertController:message:hiddenAfterDelay:inViewController:dismissCompletion:
显示 AlertController(可设置自动消失时间)
+ (void)showAlertController:(NSString *)title message:(NSString *)message hiddenAfterDelay:(NSTimeInterval)timeInterval inViewController:(UIViewController *)controller dismissCompletion:(void ( ^ ) ( void ))completion
Parameters
title |
title |
---|---|
message |
message |
timeInterval |
消失时间 |
controller |
AlertController 展示的父类控制器,如果 controller 为 nil,则显示在 keyWindow rootViewController 上 |
completion |
AlertController 消失回调 |
Discussion
显示 AlertController(可设置自动消失时间)
Declared In
RCAlertView.h
+ showAlertController:cancelTitle:preferredStyle:actionsBlock:inViewController:
显示 AlertController
+ (void)showAlertController:(NSArray *)actionTitles cancelTitle:(NSString *)cancelTitle preferredStyle:(UIAlertControllerStyle)style actionsBlock:(void ( ^ ) ( int index , UIAlertAction *alertAction ))actionsBlock inViewController:(UIViewController *)controller
Parameters
actionTitles |
操作事件 title 列表 |
---|---|
cancelTitle |
取消 title |
style |
ActionSheet or Alert |
actionsBlock |
操作事件回调,回调参数 index 、alertAction 与 actionTitles 顺序一致 |
controller |
AlertController 展示的父类控制器,如果 controller 为 nil,则显示在 keyWindow rootViewController 上 |
Discussion
显示 AlertController
Declared In
RCAlertView.h
+ showAlertController:message:actionTitles:cancelTitle:confirmTitle:preferredStyle:actionsBlock:cancelBlock:confirmBlock:inViewController:
显示 AlertController
+ (void)showAlertController:(NSString *)title message:(NSString *)message actionTitles:(NSArray *)actionTitles cancelTitle:(NSString *)cancelTitle confirmTitle:(NSString *)confirmTitle preferredStyle:(UIAlertControllerStyle)style actionsBlock:(void ( ^ ) ( int index , UIAlertAction *alertAction ))actionsBlock cancelBlock:(void ( ^ ) ( void ))cancelBlock confirmBlock:(void ( ^ ) ( void ))confirmBlock inViewController:(UIViewController *)controller
Parameters
title |
title |
---|---|
message |
message |
actionTitles |
操作事件 title 列表 |
cancelTitle |
取消 title |
confirmTitle |
确认 title |
style |
ActionSheet or Alert |
actionsBlock |
操作事件回调,回调参数 index 、alertAction 与 actionTitles 顺序一致 |
cancelBlock |
取消按钮点击回调 |
confirmBlock |
确认按钮点击回调 |
controller |
AlertController 展示的父类控制器,如果 controller 为 nil,则显示在 keyWindow rootViewController 上 |
Discussion
显示 AlertController
Declared In
RCAlertView.h