FWAlertControllerImpl

@interface FWAlertControllerImpl : NSObject <FWAlertPlugin>

/** 单例模式 */
@property (class, nonatomic, readonly) FWAlertControllerImpl *sharedInstance;

/// 自定义Alert弹窗样式,nil时使用单例
@property (nonatomic, strong, nullable) FWAlertControllerAppearance *customAlertAppearance;

/// 自定义ActionSheet弹窗样式,nil时使用单例
@property (nonatomic, strong, nullable) FWAlertControllerAppearance *customSheetAppearance;

/// 点击暗色背景关闭时是否触发cancelBlock,默认NO
@property (nonatomic, assign) BOOL dimmingTriggerCancel;

/// 弹窗自定义句柄,show方法自动调用
@property (nonatomic, copy, nullable) void (^customBlock)(FWAlertController *alertController);

/// 显示自定义视图弹窗,无默认按钮
- (void)viewController:(UIViewController *)viewController
    showAlertWithStyle:(UIAlertControllerStyle)style
            headerView:(UIView *)headerView
                cancel:(nullable id)cancel
               actions:(nullable NSArray *)actions
           actionBlock:(nullable void (^)(NSInteger index))actionBlock
           cancelBlock:(nullable void (^)(void))cancelBlock
           customBlock:(nullable void (^)(id alertController))customBlock;

@end

Undocumented

  • 单例模式

    Declaration

    Objective-C

    @property (class, nonatomic, readonly) FWAlertControllerImpl *_Nonnull sharedInstance;
  • 自定义Alert弹窗样式,nil时使用单例

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) FWAlertControllerAppearance *customAlertAppearance;
  • 自定义ActionSheet弹窗样式,nil时使用单例

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) FWAlertControllerAppearance *customSheetAppearance;
  • 点击暗色背景关闭时是否触发cancelBlock,默认NO

    Declaration

    Objective-C

    @property (nonatomic) BOOL dimmingTriggerCancel;
  • 弹窗自定义句柄,show方法自动调用

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) void (^) (FWAlertController *_Nonnull __strong) customBlock;
  • 显示自定义视图弹窗,无默认按钮

    Declaration

    Objective-C

    - (void)viewController:(nonnull UIViewController *)viewController
        showAlertWithStyle:(UIAlertControllerStyle)style
                headerView:(nonnull UIView *)headerView
                    cancel:(nullable id)cancel
                   actions:(nullable NSArray *)actions
               actionBlock:(nullable void (^)(NSInteger))actionBlock
               cancelBlock:(nullable void (^)(void))cancelBlock
               customBlock:(nullable void (^)(id _Nonnull __strong))customBlock;