当前位置:网站首页>Wkwebview white screen
Wkwebview white screen
2022-07-19 04:20:00 【Bo Bobo】
Solution
stay viewDidAppear Callback to traverse WKWebView Of subviews, lookup WKCompositingView Whether there is a white screen ; A white screen can Close page perhaps Reconstruct WKWebView page , After testing reload,loadRequest There is no effect ;
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
BOOL isblank = [self isBlankView:self.webView];
if (isblank)
{
[self performSelector:@selector(dismissViewController) withObject:nil afterDelay:0.1];
}
}
- (void)dismissViewController
{
[self.navigationController popViewControllerAnimated:YES];
}
/*
* Determine whether the screen is blank (WKCompositingView non-existent )
* YES:blank
*/
- (BOOL)isBlankView:(UIView*)view
{
//NSLog(@"root:%@", NSStringFromClass(view.class));
Class wkCompositingView = NSClassFromString(@"WKCompositingView");
if ([view isKindOfClass:[wkCompositingView class]])
{
return NO;
}
for (UIView *subView in view.subviews)
{
//NSLog(@"child:%@", NSStringFromClass(subView.class));
if (![self isBlankView:subView])
{
return NO;
}
}
return YES;
}
边栏推荐
- Academic sharing | design and development of multi staining pathological image information evaluation system based on openvino
- Wechat e-book reading applet graduation design of applet completion works (3) background function
- 小程序毕设作品之微信电子书阅读小程序毕业设计(2)小程序功能
- Wechat online education video on demand learning applet graduation design (1) development outline
- [database] must know and be able at the end of the term ----- Chapter VIII database security
- Introduction au cadre Maui 05 compréhension du modèle de données mvvm
- Machine learning 10: Integrated Learning
- What does the project set price mean?
- 【数据库】期末必知必会-----第七章 数据库完整性
- 【数据库】期末必知必会-----第二章 关系数据模型
猜你喜欢

Dapr series (I)

64. Minimum path sum: given an M x n grid containing non negative integers, please find a path from the upper left corner to the lower right corner, so that the sum of the numbers on the path is the m

小程序毕设作品之微信在线教育视频点播学习小程序毕业设计(2)小程序功能

小程序毕设作品之微信电子书阅读小程序毕业设计(3)后台功能

基于stm32f103的智能风扇系统

Simulation Implementation of library function

If by frame package name modifier

Technical writing guide for programmers to leave work early

Heartless sword Chinese English bilingual poem 005 Lyric

How to filter viruses / spam more effectively!
随机推荐
[seventh issue of notebook series] download and use of openvino pre training model
Dapr series (I)
Ftxui basic notes (botton button component Foundation)
小程序毕设作品之微信电子书阅读小程序毕业设计(7)中期检查报告
Openresty 做静态资源服务器
Wechat e-book reading applet graduation project (8) graduation project thesis template
The adaptation of go language under windows10:vscode
机器学习10:集成学习
[super cloud terminal to create a leading opportunity] local computing cloud management, Intel helps digitalize Education
wpf 找不到资源文件问题
Unity Shader - “快速“ 次散射 (Fast SSS : Fast Subsurface Scattering)
机器学习11:代价敏感学习
Find the central subscript of the array
64. Minimum path sum: given an M x n grid containing non negative integers, please find a path from the upper left corner to the lower right corner, so that the sum of the numbers on the path is the m
AttributeError: ‘NoneType‘ object has no attribute ‘sort‘
In the era of super video, what is the solution to the data flood?
Wechat official account page authorization 40029 error "suggested collection"
[database] must know at the end of the term ----- Chapter 2 relational data model
[database] must know and know at the end of the period ----- Chapter 12 database recovery
Openresty as a static resource server