uiwebview

UIWebView and Animation

余生颓废 提交于 2019-12-30 05:02:27
问题 I am wondering if there was a way to animate the size and position of a UIWebView. If I do sth like this: [UIView animateWithDuration:1.0 animations:^{ self.frame = CGRectMake(20.0, 20.0, 80.0, 80.0); }]; or [UIView beginAnimations:@"zoomIn" context:nil]; [UIView setAnimationDuration:2.75]; [UIView setAnimationDelegate: self]; self.frame = CGRectMake(20.0, 20.0, 80.0, 80.0); [UIView commitAnimations]; while there is a grey box doing the animation, the content of the WebView instantly switches

Removing shadows from UIWebView

ε祈祈猫儿з 提交于 2019-12-30 04:36:51
问题 I use a web view to display small pdf files. In the interest of aesthetics, I'd like to remove the grey border around the PDF. Is there any way around it? I've looked at various resources none of which seem to work or the solution no longer works in iOS5. Also, is there any way of stopping the scroll if there's only one page? Thanks. 回答1: The shadows are actually UIImageView subviews of the UIScrollView (or the equivalent in iOS5 UIWebView). So in iOS4: for (UIView* subView in [webView

How can I search in an UIWebView?

不想你离开。 提交于 2019-12-30 03:34:10
问题 I need to perform search in an html page displayed in a UIWebView control. The functionality I need is something that Safari has, when you hit command/ctrl F for searching the document for some word and the program highlights the hits for you. Is there any easy solution for this problem? 回答1: I know it's been a long time since you asked this question, but it's still a pretty common question people have so I put together a sample project in case anyone else is asking the same question. The

create a UIWebView and load a website programmatically

冷暖自知 提交于 2019-12-30 01:47:06
问题 The following is my code. I simply want to load a website page and put a back button on screen. Don't know why nothing shows on the screen. in .h #import <UIKit/UIKit.h> @interface ThirdViewController : UIViewController { UIWebView *myWebView; } @property (nonatomic, retain) UIWebView *myWebView; -(IBAction)goBack:(id)sender; @end in .m #import "ThirdViewController.h" @implementation ThirdViewController @synthesize myWebView; -(IBAction)goBack:(id)sender { [myWebView goBack]; } - (void

Preloading a UIWebView, avoiding white screen flash

China☆狼群 提交于 2019-12-30 00:48:32
问题 I'm working on an app that has table navigation to eventually drill down to UIWebView that displays various information. However, the transition from the slickness of UITableView to the slow wonkiness of UIWebView is jarring for the user so I want to improve that experience however I can. Specifically, the background of both the tableViews and UIWebView pages have black backgrounds, but when I open the UIWebView it flashes empty white for about a second (this is the case for both local and

Preloading a UIWebView, avoiding white screen flash

时间秒杀一切 提交于 2019-12-30 00:48:03
问题 I'm working on an app that has table navigation to eventually drill down to UIWebView that displays various information. However, the transition from the slickness of UITableView to the slow wonkiness of UIWebView is jarring for the user so I want to improve that experience however I can. Specifically, the background of both the tableViews and UIWebView pages have black backgrounds, but when I open the UIWebView it flashes empty white for about a second (this is the case for both local and

Finding and auto-filling HTML login forms in a UIWebView using JavaScript

こ雲淡風輕ζ 提交于 2019-12-29 18:01:09
问题 i have a UIWebView which acts like an internet browser and loads the HTML of the webpages that it is at. in the webViewController, the method webViewDidFinishLoad, would have loaded the HTML from the webpage when the webpage finish loading on the UIWebView. From the HTML i would like to sieve out textfields to facilitate the auto population of that textfield with values stored in my database. Any methods to do that? The method should be able to work on all websites. Set text for a textfield

Send custom headers with UIWebView loadRequest

筅森魡賤 提交于 2019-12-29 14:28:55
问题 I want to be able to send some extra headers with my UIWebView loadRequest method. I have tried: NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://www.reliply.org/tools/requestheaders.php"]]; [req addValue:@"hello" forHTTPHeaderField:@"aHeader"]; [self.theWebView loadRequest:req]; I have also tried subclassing the UIWebView and intercepting the - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:

UIWebView resizes text after rotating: looking for explanation for magical bug or my stupidity

两盒软妹~` 提交于 2019-12-29 10:27:16
问题 so I have UIWebView in my application and I load some html (article) to it, put some CSS to make everything nicer. That's simple and clear and everything is perfect until I try to add reading in landscape functionality and then I've noticed that UIWebView ignores any css "font-size" I've put in HTML and increases font size drastically after rotating to landscape mode. I've spent about 4-5 hours (I'm new to programming Iphone application, but I'm quite stubborn when it comes to making

UIWebView VS WKWebView to load local html

半城伤御伤魂 提交于 2019-12-29 09:08:12
问题 i create a html string with 500 p tag with timestamp in it i use UIWebView and WKWebView loadHTMLString:baseURL: to load it,and wkWebView is slower about 50% than UIWebVIew . why? UIWebView:0.1681529879570007 WKWebView:0.3913570046424866 回答1: WKWebView is faster for displaying html from Strings. However, there is a bug that makes UIWebView faster by default, which is the phone number detection. Running a viewController with the following code, webView being respectively a UIWebView and