Wednesday, October 14, 2026
HomeiOS Developmentios - Use WKWebView to show hyperlink pdf trigger invisible keyboard view

ios – Use WKWebView to show hyperlink pdf trigger invisible keyboard view

[ad_1]

I attempt to use WKWebView to show a hyperlink pdf, it really works, however after I examine the view hierarchy, I discovered this trigger an invisible keyboard window, and an auto format difficulty. as a result of this a system difficulty, I have no idea tips on how to repair it.
that is my code:

self.webView = [[WKWebView alloc]initWithFrame:self.view.bounds configuration:configuration];
_webView.backgroundColor = [UIColor clearColor];
_webView.allowsBackForwardNavigationGestures =YES;
_webView.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal;

[self.view addSubview:self.webView];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[@"https://xxxxxxx.pdf" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]]];
[_webView loadRequest:request];

that is the Debug view Hierarchy:
enter picture description right here

that is the auto format difficulty:
enter picture description right here

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments