FWAlertPlugin
@protocol FWAlertPlugin <NSObject>
@optional
/// 显示弹出框插件方法,默认使用系统UIAlertController
- (void)viewController:(UIViewController *)viewController
showAlertWithTitle:(nullable id)title
message:(nullable id)message
style:(FWAlertStyle)style
cancel:(nullable id)cancel
actions:(nullable NSArray *)actions
promptCount:(NSInteger)promptCount
promptBlock:(nullable void (^)(UITextField *textField, NSInteger index))promptBlock
actionBlock:(nullable void (^)(NSArray<NSString *> *values, NSInteger index))actionBlock
cancelBlock:(nullable void (^)(void))cancelBlock
customBlock:(nullable void (^)(id alertController))customBlock;
/// 显示操作表插件方法,默认使用系统UIAlertController
- (void)viewController:(UIViewController *)viewController
showSheetWithTitle:(nullable id)title
message:(nullable id)message
cancel:(nullable id)cancel
actions:(nullable NSArray *)actions
currentIndex:(NSInteger)currentIndex
actionBlock:(nullable void (^)(NSInteger index))actionBlock
cancelBlock:(nullable void (^)(void))cancelBlock
customBlock:(nullable void (^)(id alertController))customBlock;
/// 手工隐藏弹出框插件方法,默认查找UIAlertController|FWAlertController
- (void)viewController:(UIViewController *)viewController
hideAlert:(BOOL)animated
completion:(nullable void (^)(void))completion;
/// 判断是否正在显示弹出框插件方法,默认查找UIAlertController|FWAlertController
- (BOOL)isShowingAlert:(UIViewController *)viewController;
@end
Undocumented
-
-viewController:
showAlertWithTitle: message: style: cancel: actions: promptCount: promptBlock: actionBlock: cancelBlock: customBlock: 显示弹出框插件方法,默认使用系统UIAlertController
Declaration
Objective-C
- (void)viewController:(nonnull UIViewController *)viewController showAlertWithTitle:(nullable id)title message:(nullable id)message style:(FWAlertStyle)style cancel:(nullable id)cancel actions:(nullable NSArray *)actions promptCount:(NSInteger)promptCount promptBlock:(nullable void (^)(UITextField *_Nonnull __strong, NSInteger))promptBlock actionBlock: (nullable void (^)(NSArray<NSString *> *_Nonnull __strong, NSInteger))actionBlock cancelBlock:(nullable void (^)(void))cancelBlock customBlock:(nullable void (^)(id _Nonnull __strong))customBlock;
-
-viewController:
showSheetWithTitle: message: cancel: actions: currentIndex: actionBlock: cancelBlock: customBlock: 显示操作表插件方法,默认使用系统UIAlertController
Declaration
Objective-C
- (void)viewController:(nonnull UIViewController *)viewController showSheetWithTitle:(nullable id)title message:(nullable id)message cancel:(nullable id)cancel actions:(nullable NSArray *)actions currentIndex:(NSInteger)currentIndex actionBlock:(nullable void (^)(NSInteger))actionBlock cancelBlock:(nullable void (^)(void))cancelBlock customBlock:(nullable void (^)(id _Nonnull __strong))customBlock;
-
手工隐藏弹出框插件方法,默认查找UIAlertController|FWAlertController
Declaration
Objective-C
- (void)viewController:(nonnull UIViewController *)viewController hideAlert:(BOOL)animated completion:(nullable void (^)(void))completion;
-
判断是否正在显示弹出框插件方法,默认查找UIAlertController|FWAlertController
Declaration
Objective-C
- (BOOL)isShowingAlert:(nonnull UIViewController *)viewController;