CoderMJLee / MJRefresh

An easy way to use pull-to-refresh.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Jasonjunjie opened this issue · comments

描述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

运行环境

  • iPhone12
  • iOS16.5
  • Xcode14.3.1

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