uiwebview

stringByEvaluatingJavaScriptFromString doesn't always seem to work

一个人想着一个人 提交于 2019-12-09 04:53:28
I am developing an Objective C application that loads a large HTML document in to a UIWebView as the user scrolls through it. This is because the document is 20Mb and tends to crash the webview if loaded all at once. The idea is that the document is split in to chunks of HTML and as the user scrolls through it new elements are added to the document and old elements are removed. Currently I am working on getting the Objective C application to pass data to a javascript function within the document. I have the following Objective C code: - (BOOL)webView:(UIWebView *)webView2

Scrolling over highcharts graph

别来无恙 提交于 2019-12-09 04:08:27
问题 Here's my issue: I am using the phonegap framework to develop a hybrid app, and I need this application to have graphs for which I had decided to use the highcharts library. The problem is that I can't seem to be able to scroll after touching on the chart (at least while touching inside the selected portion of the image). What I want to do is prevent the chart from taking any events and show a plain graph with anything being highlighted and be able to scroll even if im doing it over the graph

iPhone UIWebView - How do you set the zoom level and position?

限于喜欢 提交于 2019-12-09 02:56:29
问题 I'm displaying a series of tiled images in a UIWebView and would like to programmatically set the UIWebview's initial zoom and view location. How does one go about doing so? 回答1: NOTE: this answer is from 2009. Please see one of the better solutions for a more civilized age. Programmatic scrolling of UIScrollView is now a solved problem. I have a detailed discussion of how (and why) UIScrollView zooming works, an example project and ZoomScrollView class that encapsulates the required zooming

Font sizes in UIWebView does NOT match iOS font size

。_饼干妹妹 提交于 2019-12-09 02:37:01
问题 Here's a UILabel which says "About". Set at exactly 17.7 in iOS. Below it a UIWebView which also says "About". Also set at exactly 17.7 using css. They don't match. How to fix this correctly? It is bizarre that in Apple's own UIWebView, the size basis is different ? Html to test... <html><head> <style type='text/css'> body { margin: 0px; font-family: 'SourceSansPro-Light'; font-size: FONTPOINTSpt; } html { -webkit-text-size-adjust:none; } </style></head> <body leftmargin=0 topmargin=0> About

Disabling ATS for an in-app browser in iOS 9?

亡梦爱人 提交于 2019-12-09 01:40:16
问题 iOS 9 introduces App Transport Security (ATS) to encourage the use of secure connections. This is great, but what if my app has a built in web browser that the user should be able to use to connect to any website? For example, the Facebook app allows stories to contain links to external websites. When the user taps such a link, rather than launching Safari, it launches an in-app browser. How can I get this same behavior without enabling the global NSAllowArbitraryLoads flag? I want all the

Does WatchKit support html? is there is controller like UIWebview?

我是研究僧i 提交于 2019-12-09 01:08:58
问题 Does WatchKit support html? is there is controller like UIWebview ?. My client want to show webpage in a Apple Watch. is this possible ? 回答1: There's no UIWebView in WatchKit (neither WatchOS 1 nor WatchOS 2 ). However, it's fully possible to work around this: You can load the HTML , pick out the relevant content, and display that in for example a Label . This is however not a smart solution, as the website owners can change its layout and render your app useless until you update it. My

Enable Cookies in UIWebView

核能气质少年 提交于 2019-12-08 23:59:13
问题 How can I enable cookies in my iPhone Application that uses a UIWebView Window, so that my login system will work? 回答1: For sure start with [NSHTTPCookieStorage sharedHTTPCookieStorage].cookieAcceptPolicy = NSHTTPCookieAcceptPolicyAlways; But, as mentioned by @JoelFan, the issue may be your User Agent string causing ASP.NET to attempt and fail at a cookieless login. Instead of a response that includes Set-Cookie: .ASPXAUTH= really-long-hex-number it returns a redirection to something like

Show progress bar until it load the data in UIWebView IOS7

余生颓废 提交于 2019-12-08 22:28:44
问题 Hi in my application i have UIWebView which loads the pdf file using URL its very large file its taking too much time to load. Now i want show the user that like its loading progress until it get load the my pdf once my file loaded its has hide the progress bar, how can I achieve this? My webview code. - (void)viewDidLoad { [super viewDidLoad]; NSString *pdf =@"http://jesusredeems.com/mag/pdf/JRE-2014-03.pdf"; NSURL *url = [NSURL URLWithString:pdf]; NSURLRequest *myRequest = [NSURLRequest

onscroll event not being triggered on iPad after single touch panning?

…衆ロ難τιáo~ 提交于 2019-12-08 19:39:15
问题 In trying to figure out the scroll position for a UIWebView, I'm attaching a listener in the HTML that will call back to the main app. I attach the javascript listener like: window.onscroll = function reportScroll() { var sY = window.pageYOffset; alert('Scroll pos: '+sY); // Would evetually trigger a URL or something } This event only seems to be triggered at the end of a flick scroll on OS 3.2 (iPad), once the deceleration has ended. However this: https://developer.apple.com/library/content

iOS UiWebView / Page Visibility Api: “pageshow” event not firing

泪湿孤枕 提交于 2019-12-08 19:21:16
问题 I am trying to use the Page Visibility Api to detect when web content is being shown in iOS. I have simple JS: window.addEventListener("pageshow", function(){ alert("page shown"); }, false); The alert fires as expected in mobile safari when the tab is made active, or when safari is minimized and then re-shown. However if I host the web content in a UiWebView, the event is not firing. Has anyone else encountered this issue? If so any work around for this? Thanks... 回答1: The UIWebView dose not