123456789101112131415161718192021222324252627282930313233343536373839 |
- //
- // CustomActionAlertController.h
- // Starbuds
- //
- // Created by 翟玉磊 on 2020/1/13.
- // Copyright © 2020 翟玉磊. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- NS_ASSUME_NONNULL_BEGIN
- @interface CustomActionAlertController : UIViewController
- /// 自定义弹窗
- /// @param title 标题
- /// @param message 内容
- /// @param sure 确认按钮 带有背景
- /// @param cancel 取消按钮
- /// @param block 回调 取消按钮index是0 确定按钮index是1
- - (instancetype)initWithTitle:(nullable NSString *)title message:(nullable NSString *)message sure:(nullable NSString *)sure cancel:(nullable NSString *)cancel selctedBlock:(void(^)(NSInteger index, NSString *title))block;
- - (instancetype)initWithTitle:(nullable NSString *)title message:(nullable NSString *)message sure:(nullable NSString *)sure cancel:(nullable NSString *)cancel selctedBlock:(void(^)(NSInteger index, NSString *title))block andCancelFullScreenTapGes:(BOOL )state;
- - (void)setupSureButtonBackgroundImage:(UIImage *)image;
- - (instancetype)initWithTitle:(nullable NSString *)title message:(nullable NSString *)message sure:(nullable NSString *)sure cancel:(nullable NSString *)cancel selctedBlock:(void(^)(NSInteger index, NSString *title))block andMuitipleLine:(BOOL )muitipleLine;
- /// 全屏显示,添加到windown上 建议使用此方法
- - (void)show;
- /// 显示到指定控制器上
- /// @param vc 父控制器不一定全屏
- - (void)showWithController:(UIViewController *)vc;
- - (void)dismiss;
- @end
- NS_ASSUME_NONNULL_END
|