FWWebViewController

@protocol FWWebViewController <FWViewController, FWWebViewDelegate>

网页视图控制器协议,可覆写

  • 网页视图,默认显示滚动条,启用前进后退手势

    Declaration

    Objective-C

    @optional
    @property (nonatomic, readonly) NS_SWIFT_UNAVAILABLE("") FWWebView *webView;
  • 左侧按钮组,依次为返回|关闭,支持UIBarButtonItem|UIImage|NSString|NSNumber等。可覆写,默认nil

    Declaration

    Objective-C

    @optional
    @property (nonatomic, readonly, nullable) NSArray *webItems;
  • 网页请求,设置后会自动加载,支持NSString|NSURL|NSURLRequest。默认nil

    Declaration

    Objective-C

    @optional
    @property (nonatomic, strong, readwrite, nullable) id webRequest;
  • 渲染网页配置,renderWebView之前调用,默认未实现

    Declaration

    Objective-C

    - (nonnull WKWebViewConfiguration *)renderWebConfiguration;
  • 渲染网页视图,renderView之前调用,默认未实现

    Declaration

    Objective-C

    - (void)renderWebView;
  • 渲染网页视图布局,renderView之前调用,默认铺满

    Declaration

    Objective-C

    - (void)renderWebLayout;
  • 渲染网页桥接,renderView之前调用,默认未实现

    Declaration

    Objective-C

    - (void)renderWebBridge:(nonnull FWWebViewJsBridge *)bridge;
  • 点击关闭按钮(不含手势返回),可用来拦截关闭时二次确认等,默认直接关闭

    Declaration

    Objective-C

    - (void)onWebClose;