uiwebview

Share WKWebView Cookies With UIWebView

怎甘沉沦 提交于 2019-12-25 12:47:08
问题 I'm trying to share WKWebView Cookies with UIWebView for getting all cookies. I know its very simple to get all cookies from UIWebView as compare WKWebView. I create two WebView's (WKWebView, UIWebView) in Tabbed Application Template. Below method that i am using for share WKWebView cookies with UIWebView but didn't get success. func webView(_ webView: WKWebView, decidePolicyFor navigationResponse: WKNavigationResponse, decisionHandler: @escaping (WKNavigationResponsePolicy) -> Void) { let

Share WKWebView Cookies With UIWebView

烂漫一生 提交于 2019-12-25 12:47:05
问题 I'm trying to share WKWebView Cookies with UIWebView for getting all cookies. I know its very simple to get all cookies from UIWebView as compare WKWebView. I create two WebView's (WKWebView, UIWebView) in Tabbed Application Template. Below method that i am using for share WKWebView cookies with UIWebView but didn't get success. func webView(_ webView: WKWebView, decidePolicyFor navigationResponse: WKNavigationResponse, decisionHandler: @escaping (WKNavigationResponsePolicy) -> Void) { let

Loading a web page in iphone and check history

爷,独闯天下 提交于 2019-12-25 09:29:59
问题 Pseudo code pageUrl = "http://www.google.com" if(pageUrl == never Downloaded) Download pageUrl else { Display Saved Version Mean while download pageUrl When done display new version } How can I do something like this in objective C for a UIWebview? Also what's the best way to save web pages for this scenario? PList, SQLite? 回答1: Plist is the best way to solve your problem. iPhone/Objective-c can access very quickly to plist file as compare to SQLite Database. Let me give you some sample code.

iphone UIWebView - Force show scrollbar always

情到浓时终转凉″ 提交于 2019-12-25 09:28:08
问题 Is there a way to force the UIWebView to always show the scroll bar? 回答1: For fulfill your requirement you must hard code in your code load any default page with some extra new line or blank spaces.which creates your page bigger than web view . 来源: https://stackoverflow.com/questions/4253085/iphone-uiwebview-force-show-scrollbar-always

stringByEvaluatingJavaScriptFromString does nothing

岁酱吖の 提交于 2019-12-25 07:32:04
问题 I'm using goNative.io to run my webapp in a wrapper/native iOS app. I'm adding bit of extra objective-c that reads the contents of HTML5 local storage and persists the data in the app when it's exited. Also, when the app opens back up I need to put that data back in local storage. My issue is that stringByEvaluatingJavaScriptFromString:jsString does not seem to run any javascript in my app. I can try to alert or console.log something and absolutely nothing happens in UIWebView . No errors

Convert BLOB image from NSData to NSString so it can be displayed in HTML UIWebView

旧街凉风 提交于 2019-12-25 06:44:59
问题 So I successfully retrieved my BLOB image from the database and set it to NSData *content.. content = [[NSData alloc] initWithBytes:sqlite3_column_blob(query, 16) length:sqlite3_column_bytes(query, 16)]; What I am trying to do is to get this content into a NSString, because I would like to then pass this string to javascript and display the image. I am not exactly sure if this is even possible, but i have read on the link below that you can display images in css/html in base64. http://mark

Get device height in javascript from non full screen UIWebView

孤人 提交于 2019-12-25 06:32:32
问题 I try to distinguish an Iphone 5 device in a non full screen UIWebview (320x216) from javascript. I am using the screen height as switch as that seems the only way to do this in javascript. The problem is that the usual way to do this reports either 0 or the height of the UIWebview , not the height of the device. document.body.offsetHeight //returns 216 screen.availHeight //returns 0 document.documentElement.clientHeight //returns 216 window.innerHeight //returns 216 screen.height //returns 0

Announce everything in a UIWebView using VoiceOver?

耗尽温柔 提交于 2019-12-25 05:35:15
问题 My app is primarily loading text-based HTML files into a UIWebView . When a new HTML file is loaded, I'd like it to be read in its entirety to VoiceOver users. Right now, it reads only the headings within <h1> tags, and then stops. It works great if I double finger swipe down. I'd really just like to automate that process upon each new page load. Right now I'm using the following within webViewDidFinishLoad : UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, self

Local HTML Cache policy in UIWebView

依然范特西╮ 提交于 2019-12-25 05:32:47
问题 I have walked through various solution to clear the local image cache in UIWebView, while i trying to load the image in html it atomically displays the previous image(i using the same name to replace the image in template). [[NSURLCache sharedURLCache] removeAllCachedResponses]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL:[NSURL fileURLWithPath:[[CustomFunctions getFilesPath] stringByAppendingPathComponent:obj]] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData

NSUserDefaults not getting stored string value

好久不见. 提交于 2019-12-25 05:31:04
问题 I have UIWebView for reading content. After that i select some text from content stores in string using NSUserDefaults in Viewcontroller. Then i retrieve this string value and displays in UITextView to viewcontroller1. But the UITextView is not updating text from viewcontroller. The NSUserDefaults also not getting updating text. Im using [self.navigationController pushViewController:viewcontroller1 animated:YES]; for switch to viewcontroller1. viewcontroller: [wbCont loadHTMLString:webString