iOS webView的自带导航栏隐藏

可以用界面导航覆盖webview自带导航,但向下滑动时还会看到,可通过以下方法解决:

webView.scrollView.delegate = self;

然后调用UIScrollView的代理方法:

-(void)scrollViewDidScroll:(UIScrollView *)scrollView{

if (scrollView.mj_offsetY < -64) {

scrollView.scrollEnabled = NO;

[self performSelector:@selector(scrollAgain) withObject:self afterDelay:0.1];

}

self.scrollV = scrollView;

}

-(void)scrollAgain{

self.scrollV.scrollEnabled = YES;

}

你可能感兴趣的:(iOS webView的自带导航栏隐藏)