FWToastPlugin

@protocol FWToastPlugin <NSObject>

吐司插件协议,应用可自定义吐司插件实现

  • 显示加载吐司,默认需手工隐藏,指定cancelBlock时会自动隐藏并调用之

    Declaration

    Objective-C

    - (void)showLoadingWithAttributedText:
                (nullable NSAttributedString *)attributedText
                              cancelBlock:(nullable void (^)(void))cancelBlock
                                   inView:(nonnull UIView *)view;
  • 隐藏加载吐司

    Declaration

    Objective-C

    - (void)hideLoading:(nonnull UIView *)view;
  • 是否正在显示加载吐司

    Declaration

    Objective-C

    - (BOOL)isShowingLoading:(nonnull UIView *)view;
  • 显示进度条吐司,默认需手工隐藏,指定cancelBlock时会自动隐藏并调用之

    Declaration

    Objective-C

    - (void)showProgressWithAttributedText:
                (nullable NSAttributedString *)attributedText
                                  progress:(CGFloat)progress
                               cancelBlock:(nullable void (^)(void))cancelBlock
                                    inView:(nonnull UIView *)view;
  • 隐藏进度条吐司

    Declaration

    Objective-C

    - (void)hideProgress:(nonnull UIView *)view;
  • 是否正在显示进度条吐司

    Declaration

    Objective-C

    - (BOOL)isShowingProgress:(nonnull UIView *)view;
  • 显示指定样式消息吐司,可设置自动隐藏和允许交互,自动隐藏完成后回调

    Declaration

    Objective-C

    - (void)showMessageWithAttributedText:
                (nullable NSAttributedString *)attributedText
                                    style:(FWToastStyle)style
                                 autoHide:(BOOL)autoHide
                              interactive:(BOOL)interactive
                               completion:(nullable void (^)(void))completion
                                   inView:(nonnull UIView *)view;
  • 隐藏消息吐司

    Declaration

    Objective-C

    - (void)hideMessage:(nonnull UIView *)view;
  • 是否正在显示消息吐司

    Declaration

    Objective-C

    - (BOOL)isShowingMessage:(nonnull UIView *)view;