当前位置:网站首页>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;
}
边栏推荐
- Cocos creator 3.0 Basics - common operations
- MAUI 框架入门学习05 MVVM数据模型理解
- 【数据库】期末必知必会-----第十一章 并发控制
- Android kotlin自定义自动换行LinearLayout
- Wechat online education video on demand learning applet graduation project (4) opening report
- 64. 最小路径和:给定一个包含非负整数的 m x n 网格 grid ,请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。 说明:每次只能向下或者向右移动一步。
- In the era of super video, what is the solution to the data flood?
- 可省近90%服务器,反欺诈效率却大增,PayPal打破「AI内存墙」的方案为何如此划算?
- C # explain out output parameters in detail
- Xdc 2022 Intel technology special session: Intel Software and hardware technology builds the cornerstone of cloud computing architecture
猜你喜欢

In the era of super video, what is the solution to the data flood?

In tech 2022 | Intel technology product innovation quick view

笔记本电脑插入耳机仍然外放(亲测有效)

超视频时代,数据洪峰何解?

mqant 深入分析

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

Wechat e-book reading applet graduation design of applet completion works (3) background function

PLC OPC 信息模型(DI,PLCopen NodeSets)简介

How to open the applet for people near wechat (the way to open the applet near wechat)

Software testing - Advanced
随机推荐
Wechat e-book reading of applet completion works (7) Interim inspection report
[super cloud terminal to create a leading opportunity] local computing cloud management, Intel helps digitalize Education
Wechat official account page authorization 40029 error "suggested collection"
Buddy: initialize memory domain
AttributeError: ‘NoneType‘ object has no attribute ‘sort‘
Smart fan system based on STM32F103
Machine learning 10: Integrated Learning
小程序毕设作品之微信电子书阅读小程序毕业设计(3)后台功能
Structure gets the address of the main structure (struct) through member variables
Use of anti shake debounce and throttling throttle
Live broadcast of cloud intelligence face to face is waiting for you: computing power redefines productivity
If by frame package name modifier
Chapter 6 performance platform godeye source code analysis - Custom expansion module
小程序毕设作品之微信电子书阅读小程序毕业设计(4)开题报告
机器学习11:代价敏感学习
Openresty as a static resource server
Chapter 3 performance platform godeye source code analysis - memory module
英特尔专家分享:如何在XPU架构上高效编程?丨至强研究所
[wechat applet] super easy to understand conditional rendering and list rendering
Welcome to Hensen_ Blog directory of (full site navigation)