uiwebview

Prevent Phone Number recognition on JqueryMobile

半城伤御伤魂 提交于 2019-12-22 18:23:35
问题 I have this problem using Jquery Mobile. The issue was I have a date value of "12/6/1999" that is displayed on a label. Now JQuery Mobile converted it to a link because it is recognize as a phone number. I'm not very sure if it's jquery that does that or the iPhone. So, my first approach was I'm looking for a way to prevent jquery mobile to recognize phone numbers. Is there a way to do it? If it's iPhone that does it, is there a way that I can disable it? Your help is greatly appreciated. 回答1

Getting the position of an HTML element in UIWebView

梦想与她 提交于 2019-12-22 18:09:41
问题 I have UIWebView loaded with an HTML file. I want to know the position (means x and y cordinates) of an HTML element on the screen when the webview is loaded. Thanks in advance 回答1: You may need to a combination of JavaScript and Objective-C to achieve this. You need a JavaScript function to pass back the screen position of certain element, and then translate that position to the screen on the iPhone. - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script One way is to write

UIWebView scalesPageToFit won't scale page

ぃ、小莉子 提交于 2019-12-22 18:02:13
问题 I have a UIWebView that, despite having scalesPageToFit set to YES, doesn't perform any such scaling operation: The web page starts off zoomed in and it's necessary to unpinch to get the whole thing on the page. What could prevent UIWebView::scalesPageToFit from being honored? 回答1: You could inject the viewport element via JavaScript. Look for the viewport meta tag here: Safari Meta Tags <meta name="viewport" content="width=320, initial-scale=2.3, user-scalable=no"> 回答2: Create a file in your

iPhone Development - SVG image in UIWebView

时光总嘲笑我的痴心妄想 提交于 2019-12-22 17:58:47
问题 I'm trying to display an svg graph with associated javascript in my application using UIWebView. The .svg file is stored locally. The problem i'm facing is that the zoom in/out and scrolling is horrible. This happens with large images. I've tested this in simulator. Does anyone know the reason? I've tested quite a few svg graphs using iPhone's Safari App and they render perfectly, and zoom in/out plus scrolling works perfectly (without any jitters) - even for 4-5 MB graphs. The code is very

Scroll to text on UIWebView [closed]

谁都会走 提交于 2019-12-22 17:41:22
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm developing an iOS application with latest SDK and XCode 4.2. I want to search a text in a UIWebview and scroll to the first text found. I'm using this tutorial to find text: http://zaldzbugz.posterous.com/how-to-search-a-string-inside-uiwebview How can I scroll to first text found? 回答1: Let's go step by step

iPhone UIWebView - Calling loadHTMLString:baseURL: a second time doesn't do anything?

霸气de小男生 提交于 2019-12-22 15:09:24
问题 Is the -loadHTMLString:baseURL: method of UIWebView meant to only be called once per instance? Here's my logic flow: 1. View loads & supplies UIWebView placeholder text via -loadHTMLString:baseURL: 2. NSURLConnection requests a URL asynchronously 3. Upon NSURLConnection finished, replace UIWebView content with loaded data via -loadHTMLString:baseURL: Debugging shows that loadHTMLString:baseURL: is being called and the string being passed in is correct, but the UIWebView isn't updated. I even

It is posible to load customise HTML view into webView in swift?

无人久伴 提交于 2019-12-22 14:40:13
问题 suppose I am loading url into webView and it looks like: But I want to remove some unwanted thing from this url like: I searched a lot on internet but nothing helpful found.but I think that I have to remove some of tag from HTML view before it's load into webView. but I don't know how to do this. Is it possible and if yes then how can I perform this action? Please help me for this. 回答1: I have found the solution for my question and for that THIS tutorial helps me a lot. as shown into this

It is posible to load customise HTML view into webView in swift?

空扰寡人 提交于 2019-12-22 14:39:15
问题 suppose I am loading url into webView and it looks like: But I want to remove some unwanted thing from this url like: I searched a lot on internet but nothing helpful found.but I think that I have to remove some of tag from HTML view before it's load into webView. but I don't know how to do this. Is it possible and if yes then how can I perform this action? Please help me for this. 回答1: I have found the solution for my question and for that THIS tutorial helps me a lot. as shown into this

Resizing UIWebView text

倖福魔咒の 提交于 2019-12-22 14:12:53
问题 I am trying to let the user resize the text of the given web page. I am using Swift in Xcode 6. HTML file: <!DOCTYPE html> <html> <body> <h1>My First Heading</h1> My first paragraph. </body> </html> and here is the swift function I am calling to try to change the size: func changeWebViewFontSize(decOrInc: Int, webView: UIWebView) { //1 = decreace //2 = increace var textFontSizeTemp = defaults.objectForKey("textFontSize") as Int switch decOrInc { case 1: //when decrease defaults.setObject

UIWebView on iOS 6 does not display images with relative URLs in webarchives

[亡魂溺海] 提交于 2019-12-22 13:46:35
问题 We are using webarchives in our apps sometimes as it is very convenient way to store HTML + all associated images/CSS/scripts/etc inside a single file on the desktop, put it into the project, and then load it into a UIWebView with a single call like that: NSData *webArchiveData = /* ... Load data from a single file ... */ ; [webView loadData:webArchiveData MIMEType:@"application/x-webarchive" textEncodingName:@"utf-8" baseURL:nil ]; This stopped working on iOS 6 however: the HTML is loaded,