[ad_1]
I’m having an issue with wkWebView. The next code under works effective fixing pdf’s grey borders in different customary browsers.
Lately we have now modified to utilizing wkWebView in our app and for some cause the code under will not be working particularly for wkWebView. Any concepts?
That is my objc code:
for (UIView *object in wkWebView.scrollView.subviews) {
if ([NSStringFromClass([object class]) isEqualToString:@"UIWebPDFView"]) {
UIView *pdfView = object;
[pdfView setBackgroundColor: [UIColor whiteColor]];
for (UIView *pdfObjectSubview in pdfView.subviews) {
//[pdfObjectSubview setBackgroundColor: [UIColor whiteColor]];
if ([NSStringFromClass([pdfObjectSubview class]) isEqualToString:@"UIPDFPageView"]) {
UIView *uiPDFPageView = pdfObjectSubview;
[[uiPDFPageView layer] setShadowOpacity: 0.0f];
//[uiPDFPageView setBackgroundColor: [UIColor whiteColor]];
//[uiPDFPageView.layer setBackgroundColor: [UIColor whiteColor].CGColor];
}
}
}
}
Thanks upfront
[ad_2]

