uiwebview

How to activate spellchecking for a contentEditable div in a UIWebView?

六月ゝ 毕业季﹏ 提交于 2019-12-21 03:25:11
问题 UIWebView (iOS 5.0) does not show the red-squiggly spelling correction underlines for this: id html= @"<div spellcheck=\"true\" contenteditable=\"true\"></div>" [webView loadHTMLString:html baseURL:nil]; Is it possible to get them? 回答1: There are some HTML tag properties available by Apple Safari Guidelines autocomplete : If off, deactivates automatic completion for an input element; If on, activates automatic completion for the element. Related Tags “input” Availability Available in Safari 1

UIWebView show UIActivityIndicator for loading but ignore additional load requests (e.g. javascript loaded advertisements) after page initially loads

杀马特。学长 韩版系。学妹 提交于 2019-12-21 03:12:05
问题 This is a Q&A post. To inform the many other users I saw who struggled with this issue as I browsed through StackOverflow's database. None of these users ever got a solid answer (and most of them were posing the question years ago so I wasn't going to bump the post). The issue many struggled with is as follows: When you try to load a page in a UIWebView and the page then loads another page maybe via an iFrame or it loads an advertisement through javascript you end up getting the page loading

UiWebView reset zoom programmatically

旧城冷巷雨未停 提交于 2019-12-21 03:09:11
问题 Is there a way to zoom out or reset a UiWebView programmatically ? if yes how ? 回答1: i think you should be able to manipulate the viewport using the safari meta tags https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html#//apple_ref/doc/uid/TP40008193-SW6 For example, to set the viewport width to the width of the device, add this to your HTML file: <meta name = "viewport" content = "width = device-width"> To set the initial

Any alternative to using execCommand for Highlighting HTML in iOS ebook reader

可紊 提交于 2019-12-21 02:59:07
问题 I'm developing a book reader for iOS using a UIWebView . At the moment I'm working with some basic HTML files but will eventually work with ePubs. I am looking for a suitable way of styling ranges of text. My ranges are a little bit special in that they usually encompass three ranges - a keyrange and a range immediately before and range immediately after. The keyrange may span multiple nodes and may start or end for example within a selection of bold text etc. The styling should not be

UIWebView PaginationMode always show white background, how to make it transparent?

混江龙づ霸主 提交于 2019-12-21 02:43:31
问题 I try to use 'paginationMode' to make my html-content pagination for iOS 7 latter. //set webview to transparent webView.backgroundColor = [UIColor clearColor]; webView.opaque = NO; // set multi-columns webView.paginationBreakingMode = UIWebPaginationBreakingModePage; webView.paginationMode = UIWebPaginationModeLeftToRight; webView.pageLength = webView.bounds.size.width; // set html to transparent background NSString *transparent = @"addCSSRule('html', 'background-color: transparent')";

Cordova iOS 10.3.1 breaks input file for videos

为君一笑 提交于 2019-12-21 02:42:54
问题 This is similar to this much older issue: HTML file input with multi selection in UIWebView not working for videos This is NOT a duplicate of this: iOS update to 10.3.1 breaks HTML input element I have tested this on my app that was working, on versions going back 45 days, it seems iOS 10.3.1 changed the file input and now there is the multiple video selection, without the "compressing" stage that occurred after selection and before switching out of the interface. Tested on iphone 6S. When

Printing Pdf using AirPrint causes small output

点点圈 提交于 2019-12-21 02:38:22
问题 I trying to print a pdf with UIPrintInteractionController that it load in the UIWevView . The good news is that i can print the bad is that the output of the print is to small. any help would be appreciated :) - (IBACTION) printPDF { if ((!_webView)) return; UIPrintInteractionController *controller = [UIPrintInteractionController sharedPrintController]; void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) = ^(UIPrintInteractionController *printController, BOOL completed,

How do I enable horizontal scrolling and disable vertical scrolling in UIWebview?

安稳与你 提交于 2019-12-20 22:02:12
问题 My UIWebView should not allow vertical scrolling. However, horizontal scrolling should possible. I have been looking through the documentation, but couldn't find any hints. The following code disables both scrolling directions, but I want to only disable vertical: myWebView.scrollView.scrollEnabled = NO; How do I solve this problem? 回答1: Enable Horizontal scrolling and disable Vertical scrolling: myWebView.scrollView.delegate = self; [myWebView.scrollView setShowsVerticalScrollIndicator:NO];

UIWebView loadHTMLString shows blank screen

和自甴很熟 提交于 2019-12-20 17:29:59
问题 I have a strange problem with UIWebView's loadHTMLString, where it would only display a blank view when I called loadHTMLString with my content HTML string. It does not matter what the content of the htmlstring is, it simply does nothing. The strange thing is that it used to work a few weeks ago, when I tested it on the simulator and device. My code is below: NSMutableString *sHtmlBuf = [NSMutableString stringWithString:@"<body style=\"background-color: #000000; color: #FFFFFF; font-family:

Creating an IPhone Map application

大憨熊 提交于 2019-12-20 15:33:52
问题 How can i create a map application for Iphone . I know that UIwebView can be used to display map . But is there any native API available on IPhone(which the native iphone map application uses)? 回答1: Look at the simple framework from CloudMade: http://developers.cloudmade.com/projects/show/iphone-api I use it in a simple app that I created to locate your position. It's in the App Store under PinDrop in the Navigation section. The framework is really rough, but it worked for what I needed. When