uiwebview

Why does a UIWebView instance not call scrollViewDidScroll?

扶醉桌前 提交于 2019-12-06 19:02:48
问题 iOS documention says, that the UIWebView class conforms to UIScrollViewDelegate. But an UIWebView instance does not call the scrollViewDidScroll method of its controller. The delegate is set just right by [webView setDelegate:self]; and webViewDidFinishLoad is called successfully. The controller implements both delegates, UIWebViewDelegate and UIScrollViewDelegate, like this: @interface WebviewController : UIViewController<UIWebViewDelegate, UIScrollViewDelegate>{ UIWebView *webView; }

How to read console logs of wkwebview programmatically

人走茶凉 提交于 2019-12-06 17:41:42
问题 I am trying to read the console logs of webapp that is loaded in my WkWebview programmatically. so far in my research it's not possible. How can I achieve this? 回答1: Please use this beautiful in-app "Bridge" Edit: self.webView = [[WBWKWebView alloc] initWithFrame:self.view.bounds]; self.webView.JSBridge.interfaceName = @"WKWebViewBridge"; WBWebDebugConsoleViewController * controller = [[WBWebDebugConsoleViewController alloc] initWithConsole:_webView.console]; Then , you can use the delegate

Embedded UIWebView YouTube Volume

浪尽此生 提交于 2019-12-06 17:41:26
I'm working on an iOS app that can display YouTube videos in a UIWebView. Everything is working great except... The first time a video is played it plays at ~10% volume. The device volume is set at 100% and the player volume shows 100% in the UI. Backing out of the web view and play a song in the app using our native streaming player then go back to the video it plays at the correct volume. Things that don't work... - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [[MPMusicPlayerController applicationMusicPlayer] setVolume:1.0]; } - (void)viewDidAppear:(BOOL)animated {

Xamarin iOS clear cache from WKWebView

匆匆过客 提交于 2019-12-06 17:40:42
I am doing following to clear the cache from the WkWebView . I would like to know how do I confirm that the cache is cleared var request = new NSUrlRequest (webURL, NSUrlRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData, 0); NSUrlCache.SharedCache.RemoveAllCachedResponses (); NSUrlCache.SharedCache.MemoryCapacity = 0; NSUrlCache.SharedCache.DiskCapacity = 0; Is there a way to print the cache when making the request Iain Smith From this question looks like you do this (c# version) for iOS 9 and it will print out which records are deleted: var websiteDataTypes = new NSSet<NSString>(new []

Grey bar on top of UIWebView in iOS 10

社会主义新天地 提交于 2019-12-06 16:56:47
When I drag a UIWebView from the Object Library in Xcode, I get a UIWebView with this dark grey bar at the top: What is that and how can I get rid of it? You need put self.automaticallyAdjustsScrollViewInsets = NO; in ViewDidLoad The other choice is disable option Adjust Scroll View Insets in the .xib of your viewcontroller That dark grey color is the background color set for the UIWebView. This will show if a webpage is smaller than the frame of the web view. You won't see it if you change the background color to white or transparent. _webView.scrollView.contentInsetAdjustmentBehavior =

Display UIWebView in custom MonoTouch.Dialog Element

梦想的初衷 提交于 2019-12-06 16:29:48
问题 Working on a way to display HTML and RTF content in a custom Element in MonoTouch.Dialog . To get started, I created a new class based on the UIViewElement implementation, with the intention of displaying a UIWebView in a cell (see UIViewElement code here). The custom element works, but the contents of the UIWebView is never displayed. Once the text of the UIWebView is loaded, I try to resize it using UIWebView.SizeThatFits . This function always return 0s, even though the width given to it

Issues in generating PDF from uiwebview in objective c

我怕爱的太早我们不能终老 提交于 2019-12-06 16:08:51
问题 I have open pdf file in uiwebview, add image and text in uiwebview subview.Then i tried created pdf file. Below sample i have used to generate pdf file. Multiple page writing in single page. How can i write sample quality and exact size. Please check screen shots and below source UIGraphicsBeginPDFContextToData( pdfData, CGRectZero, nil ); for (int i = 0; i < 10; i++) { CGRect f = [pdfView frame]; [pdfView setFrame: f]; UIGraphicsBeginPDFPage(); CGContextRef currentContext =

UIWebView contextual menu while displaying PDF content

谁都会走 提交于 2019-12-06 16:06:37
In my application, I use UIWebView to display different types of files like, html, pdf, doc etc. I am customizing the contextual menu on html content, by disabling callout and using gesture recognizer. It works fine for html content. However when displaying pdf content web view uses different classes from corepdf framework which is private framework. So none of the technique which worked on html content works with pdf content. UIWebView uses UIPDFPageView and related classes to display contextual menu on long pressing on hyperlink. Is there any method to override the display of contextual menu

UIWebView white screen on every launch while preloading all tabs

。_饼干妹妹 提交于 2019-12-06 15:31:52
Before I present my issue, I want to mention that I tried looking for solutions here and here . I am creating a hybrid application which uses native UIWebView for rendering the responsive designed web application. Following is the issue description : 1. I have a UITabBarController . 2. Each of the tab has a UIWebView . 3. I have to preload all tabs. 4. I am showing a UIActivityIndicator till the content loads on the first tab. 5. White screen appears for about 8-10 seconds and then the content starts to appear. I will be happy to see this time become 2-4 seconds . Following is my

Refresh a UIWebView

荒凉一梦 提交于 2019-12-06 15:28:57
I'm looking for a simple way of adding a refresh mechanism to my UIWebView. I've seen posts about the EGO pull to refresh but, to be honest, I don't understand how that works, especially since I have no clue on how to use it with a UIWebView instead of a table view. And it seems to me like a lot of overhead for just a simple refresh. I thought about adding a navbar but instead of a back button, add a custom "refresh" one. But based on what I've found so far, it seems as complicated as the other solution. So, basically, I'd like to know what you would do. Keep in mind that the only requirement