uiwebview

General-Block 56, 1024, 8, 244, 24 Memory Leaks using UIWebView loadRequest

…衆ロ難τιáo~ 提交于 2019-12-04 10:04:28
I'm getting memory leaks that i can't figure out through leaks, build/analyze or overall inspection how to repair. I have a very strong notion that it's due to the loadRequest command from my UIWebview loading javascript, but I can't figure out what's wrong. Here's my setup: I have a tabbarcontroller that i programatically create with 4 view controllers: a table view, a mapview, another table view and a webview, respectively. the 1st tableview shows static data. the mapview shows annotations that when clicked populates a variable of the 4th tab, the webview, and switches to the webview to

iOS UIWebView intercept link click

本小妞迷上赌 提交于 2019-12-04 09:57:10
问题 Is it possible intercept when a user clicks a link in a UIWebView and retrieve the link? I wish to block the UIWebView from going to the clicked link and do something else. Thanks in advance. 回答1: Yes, look at the UIWebViewDelegate Protocol Reference, specifically webView:shouldStartLoadWithRequest:navigationType: The NSURLRequest will let you know where the link they clicked is going to direct them. You would simply return NO on this method if you want to prevent the request from loading. 来源

Is the Scan Credit Card option available on the WebView?

﹥>﹥吖頭↗ 提交于 2019-12-04 09:38:49
问题 The new iOS8 Scan Credit Card option is great on Safari. Has someone managed to make it work inside a WebView for a web app? I am using a valid SSL certificate, and I am using the correct ID for input filed as described here: https://stackoverflow.com/a/25925195/3949713 Thanks. 回答1: No, this option is not available in neither UIWebView nor WKWebView . Your best bet is to use SFSafariViewController instead. The reason it works there is because it runs in a separate process, to prevent your app

Is UIWebview JS Performance slower than mobile safari on iOS 6/7?

牧云@^-^@ 提交于 2019-12-04 09:35:03
问题 We have recently tested some HTML5 content with heavy javascript libraries from an iOS app. The app designed to load these contents in UIWebview. iOS 6 was used for this testing. My team did not observe any noticeable performance issues against mobile safari browser. But on the web and in other stackoverflow discussions (like this one - link) experts claim that UIWebview misses Nitro Javascript Engine so it is usually much slower than Mobile Safari Browser. Is this no longer an issue with the

“Plugin handled load” dialog appears when playing a video within a web page within UIWebView

可紊 提交于 2019-12-04 09:29:06
If I click on a link to a video within a web page being displayed by UIWebView then the video plays but a dialog pops up saying "Plugin handled load". Does anybody know why this happens and how to stop it from happening? This is not a duplicate of: Playing videos in UIWebView broken in iOS4? as I am not creating a UIWebView with a zero size frame, which is described as the cause. (Am using iOS 5) Barlow Tucker The problem would seem to be in the fact the UIWebView does not include the same user agent string as mobile safari. (See this question here ). If your video is being converted to HTML5

Preventing annoying HTML5 geolocation alerts inside UIWebView

北城以北 提交于 2019-12-04 09:27:00
问题 Whenever an script requests the geolocation using HTML5 's geolocation API, the UIWebView asks for a permission to use the iOS location services. This is pretty annoying, specially when you load static HTML files, it keeps asking the permission for each file, even if the user already granted this permission for the app itself. Is there a way to prevent it? I know that on safari the permission for geolocation is based on the domain and I agree on asking for permission when the request is done

How show activity-indicator when press button for upload next view or webview?

萝らか妹 提交于 2019-12-04 09:22:57
when i click on button which title is click here to enlarge then i want show activity indicator on the first view and remove when load this view. but i go back then it show activity indicator which is shown in this view. in first vie .m file i have use this code for action. -(IBAction)btnSelected:(id)sender{ UIButton *button = (UIButton *)sender; int whichButton = button.tag; NSLog(@"Current TAG: %i", whichButton); UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; [spinner setCenter:CGPointMake(160,124)];

What happens to cookies of webview on closing the application?

会有一股神秘感。 提交于 2019-12-04 09:12:15
i am using a webview in an app which has keep me signed in functionality like facebook app.so in order to implement i need that the cookie should be persistant.I just wanted to know whether ios persists the cookie by default when the app is closed or i need to save the cookie manually before closing the app to implement keep me signed in functionality. any help would be deeply appreciated. Thanks Jake Vizzoni You want to use a NSHTTPCookieStorage object to manage the cookies. The short answer to your question is to use NSHTPPCookieStorage which will distribute the shared instance. You can use

UIWebView loadHTMLString not working in iOS5

末鹿安然 提交于 2019-12-04 09:08:19
问题 Perhaps this is similar to this question, which has no responses: loadHTMLString Not Working With iOS5? I have a UIWebView which I populate using loadHTMLString:baseURL:. The HTML is small and simple, and it references a css style sheet and a javascript script, which are loaded via the baseURL:, which is set to a directory inside the app's bundle. // load the html NSString* filePath = [NSString stringWithFormat: @"%@/html", [[NSBundle mainBundle] resourcePath ] ]; [_pCurrentWebView

iphone: View on top of UIWebView?

六眼飞鱼酱① 提交于 2019-12-04 08:41:14
问题 I'm working on a browser app, and I have an address bar on top the UIWebView. On MobileSafari if you scroll down, the address bar starts to move to the top, out of the screen, and the UIWebView doesn't scroll. Only when the address bar disappears completely, it starts to scroll. I would like to have this effect in my app as well. What's the best way to implement this? Thanks 回答1: The only way to implement this requires iOS 5. In iOS 5, UIWebView has an UIScrollView subview. And use the