CoderMJLee / MJRefresh

An easy way to use pull-to-refresh.
MIT License
13.8k stars 3.55k forks source link

WKWebView 使用 AutoLayout 初次加载显示不全 #1590

Open Jasonjunjie opened 1 year ago

Jasonjunjie commented 1 year ago

描述bug WKWebView 使用 AutoLayout 初次加载显示不全

必现/偶发? 必现

//    self.webView = [[WKWebView alloc] initWithFrame:self.view.bounds];
//    self.webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

    UIView *topView = [[UIView alloc] initWithFrame:CGRectZero];
    topView.backgroundColor = UIColor.yellowColor;
    [self.view addSubview:topView];
    [topView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.top.mas_equalTo(0);
        make.height.mas_equalTo(60);
    }];

    self.webView = [[WKWebView alloc] initWithFrame:CGRectZero];

    [self.view addSubview:self.webView];
    self.webView.navigationDelegate = self;

    [self.webView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.top.mas_equalTo(topView.mas_bottom);
        make.bottom.mas_equalTo(0);
    }];

截图 IMG_7521

运行环境

额外的 最好能提供出现bug的Demo MJRefreshExample.zip