UIWindow(FWToastPlugin)

@interface UIWindow (FWToastPlugin)

UIWindow全局使用吐司插件,内部使用UIWindow.fw.mainWindow

  • 设置吐司外间距,默认zero

    Declaration

    Objective-C

    @property (class, nonatomic) UIEdgeInsets fw_toastInsets;
  • 显示加载吐司,需手工隐藏,默认文本

    Declaration

    Objective-C

    + (void)fw_showLoading;
  • 显示加载吐司,需手工隐藏,支持String和AttributedString

    Declaration

    Objective-C

    + (void)fw_showLoadingWithText:(nullable id)text;
  • 显示加载吐司,默认需手工隐藏,指定cancelBlock时会自动隐藏并调用之,支持String和AttributedString

    Declaration

    Objective-C

    + (void)fw_showLoadingWithText:(nullable id)text
                       cancelBlock:(nullable void (^)(void))cancelBlock;
  • 隐藏加载吐司

    Declaration

    Objective-C

    + (void)fw_hideLoading;
  • 是否正在显示加载吐司

    Declaration

    Objective-C

    @property (class, nonatomic, readonly) BOOL fw_isShowingLoading;
  • 显示进度条吐司,需手工隐藏,支持String和AttributedString

    Declaration

    Objective-C

    + (void)fw_showProgressWithText:(nullable id)text progress:(CGFloat)progress;
  • 显示进度条吐司,默认需手工隐藏,指定cancelBlock时会自动隐藏并调用之,支持String和AttributedString

    Declaration

    Objective-C

    + (void)fw_showProgressWithText:(nullable id)text
                           progress:(CGFloat)progress
                        cancelBlock:(nullable void (^)(void))cancelBlock;
  • 隐藏进度条吐司

    Declaration

    Objective-C

    + (void)fw_hideProgress;
  • 是否正在显示进度条吐司

    Declaration

    Objective-C

    @property (class, nonatomic, readonly) BOOL fw_isShowingProgress;
  • 显示默认样式消息吐司,自动隐藏,支持String和AttributedString

    Declaration

    Objective-C

    + (void)fw_showMessageWithText:(nullable id)text;
  • 显示指定样式消息吐司,自动隐藏,支持String和AttributedString

    Declaration

    Objective-C

    + (void)fw_showMessageWithText:(nullable id)text style:(FWToastStyle)style;
  • 显示指定样式消息吐司,自动隐藏,自动隐藏完成后回调,支持String和AttributedString

    Declaration

    Objective-C

    + (void)fw_showMessageWithText:(nullable id)text
                             style:(FWToastStyle)style
                        completion:(nullable void (^)(void))completion;
  • 显示指定样式消息吐司,可设置自动隐藏和允许交互,自动隐藏完成后回调,支持String和AttributedString

    Declaration

    Objective-C

    + (void)fw_showMessageWithText:(nullable id)text
                             style:(FWToastStyle)style
                          autoHide:(BOOL)autoHide
                       interactive:(BOOL)interactive
                        completion:(nullable void (^)(void))completion;
  • 隐藏消息吐司

    Declaration

    Objective-C

    + (void)fw_hideMessage;
  • 是否正在显示消息吐司

    Declaration

    Objective-C

    @property (class, nonatomic, readonly) BOOL fw_isShowingMessage;