uiwebview

pinch zooming for a UIWebView for ios 3.0 and newer

风格不统一 提交于 2019-12-11 05:08:07
问题 I've been reading about how to support the zooming for a webview, and i've found a lot of resources. And now i'm really lost. What i've read: all you need is to enable the 'scales page to fit' add the uiwebview inside a uiscrollview (while setting the minimum/maximum zoom scale and implementing - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView) then you might need to handle the touchdown events... manually then you might have to recognize them... manually... or using a gesture

Javascript execution speed

依然范特西╮ 提交于 2019-12-11 05:07:42
问题 Hey, this question might sound totally idiotic so I am sorry. I am a total noob what comes to these things, but does the iOS javascript executions speed depend on the internet connection or hardware specs? 回答1: The connection can impact AJAX calls speed, but NOT loaded javascript execution speed. Hardward speed also has an impact on javascript execution speed. Regards, 回答2: The Internet speed only affects javascript during a request, like an ajax request for example. What your script is

How to run javascript and fetch a value of hidden variable in page source using XCUITest?

China☆狼群 提交于 2019-12-11 04:59:48
问题 I'm new to this iOS world but quite excited to use XCUITest to automate my iOS webView application. I'm trying to figure out as to how can i run javascript from my XCTest for webView application and fetch the value of the hidden variable. For e.g. my app has webView and it's page source contains the following elements <input type="hidden" name="demo" value="test"> I've got the handle of the webView using the following: let webViewQury:XCUIElementQuery = app.descendantsMatchingType(.WebView)

Large page in UIWebview not always scrolling diagonally

家住魔仙堡 提交于 2019-12-11 04:58:21
问题 I have a page in a UIWebview whose main element is taller and wider than the webview itself. I'd like to be able to "pan" around the page smoothly in any way the user chooses: horizontally, vertically, diagonally or swiping in a circular motion. Usually it works, however around once in every three gestures, the UIWebView scrolls on only one axis (sometimes x, sometimes y), despite gesturing on both simultaneously. The problem tends to happen most often just after the webview has loaded. After

UIWebView Launch in Safari

核能气质少年 提交于 2019-12-11 04:50:02
问题 I know that this has been brought up many a times and answered twice as many on this site, however I think I may have something a little different and need to know if it is possible. I am trying to load a banner ad from a website into a UIWebView in the app. All of this works flawlessly. However no matter what code I have tried to implement I cannot get it so that when the ad is clicked in the app it will launch in safari. Basically I am wanting to have my own Ad server. The ad is managed ad

Multiple UIWebViews, how do I track webViewDidFinishLoad for both?

北慕城南 提交于 2019-12-11 04:48:31
问题 I've tried: - (void) webViewDidFinishLoad:(UIWebView *)webView1{ } - (void) webViewDidFinishLoad:(UIWebView *)webView2{ } Errors are that I can't redefine the same method. If I have to use the same method, I need to figure out some way of identifying one webView from the other, how would I do this? Cheers 回答1: - (void) webViewDidFinishLoad:(UIWebView *)webview{ if ( webview == self.webview1 ) { // in case of webview 1 } else if ( webview == self.webview2 ) { // in case of webview 2 } else {

Pass through touches to portion of UIWebView

蓝咒 提交于 2019-12-11 04:47:25
问题 I have a UIWebView. Using something like this: http://blog.evandavey.com/2009/02/how-to-make-uiwebview-transparent.html .. I have made the UIWebView transparent. I now need to be able to pass though touches on the webview to the view below, but only on a rectangular portion of the web view. So, imagine the webview is a square, and it has a square area in the centre which must pass-thru touches to the view below. Is there a way to do this? 回答1: This is a more specific form of hitTest

load website with hashs in the url

人盡茶涼 提交于 2019-12-11 04:45:12
问题 I've got a webview that I save the url from anytime the application goes to the background/exits so I can preserve our users location on our website. I store user-entered data in hashtags in the url: https://test.org/?page=test#user_dat1=test#user_dat2=test Where user_dat1 and user_dat2 is keeping track of where the user is and what they have entered on a page. When I use the following: NSURL *url = [NSURL URLWithString:@"https://test.org/?page=test#user_dat1=test#user_dat2=test"]; [self

MonoTouch: Calling UIWebView.LoadHTMLString Once Web Page is Loaded

混江龙づ霸主 提交于 2019-12-11 04:45:00
问题 When a UIWebView contains an external web site using LoadRequest, then the LoadHtmlString() is called, you get this error. Is there a way around this? 0 OilGasDictionary 0x000908ec mono_handle_native_sigsegv + 284 1 OilGasDictionary 0x00005c42 mono_sigsegv_signal_handler + 178 2 libsystem_c.dylib 0x9555059b _sigtramp + 43 3 ??? 0xffffffff 0x0 + 4294967295 4 OilGasDictionary 0x00169eee mono_runtime_invoke + 126 5 OilGasDictionary 0x0020c14d monotouch_exception_handler + 61 6 CoreFoundation

Swift - Add UIImageView as subview of UIWebView scrollView and scaling

六眼飞鱼酱① 提交于 2019-12-11 04:23:34
问题 I have a UIWebView and I have successfully added a UIImage view to the UIWebView ’s scrollView like so: let localUrl = String(format:"%@/%@", PDFFilePath, fileNameGroup) let url = NSURL.fileURLWithPath(localUrl) panRecognizer = UITapGestureRecognizer(target: self, action: #selector(panDetected)) pinchRecognizer = UIPinchGestureRecognizer(target: self, action: #selector(pinchDetected)) panRecognizer.delegate = self pinchRecognizer.delegate = self webview = UIWebView() webview.frame = self.view