uiwebview

Refresh a UIWebView

爱⌒轻易说出口 提交于 2020-01-14 03:27:08
问题 I'm looking for a simple way of adding a refresh mechanism to my UIWebView. I've seen posts about the EGO pull to refresh but, to be honest, I don't understand how that works, especially since I have no clue on how to use it with a UIWebView instead of a table view. And it seems to me like a lot of overhead for just a simple refresh. I thought about adding a navbar but instead of a back button, add a custom "refresh" one. But based on what I've found so far, it seems as complicated as the

XCode Prevent UIWebView flashing white screen after Launch Image

别说谁变了你拦得住时间么 提交于 2020-01-13 06:53:22
问题 I am fairly new to XCode - I'm designing an app with a single view that just displays a UIWebView that loads my jQuery mobile web site. I have the Default.png and Default@2x.png files for the Launch images in place. When I run the app on my test device or in the emulator, it shows my Launch Image, and then flashes a white screen while the UIWebView loads the first page. I know that I can change the background color and opacity so it will flash a different color than white, but I would like to

XCode Prevent UIWebView flashing white screen after Launch Image

我怕爱的太早我们不能终老 提交于 2020-01-13 06:53:07
问题 I am fairly new to XCode - I'm designing an app with a single view that just displays a UIWebView that loads my jQuery mobile web site. I have the Default.png and Default@2x.png files for the Launch images in place. When I run the app on my test device or in the emulator, it shows my Launch Image, and then flashes a white screen while the UIWebView loads the first page. I know that I can change the background color and opacity so it will flash a different color than white, but I would like to

General-Block 56, 1024, 8, 244, 24 Memory Leaks using UIWebView loadRequest

♀尐吖头ヾ 提交于 2020-01-13 03:17:46
问题 I'm getting memory leaks that i can't figure out through leaks, build/analyze or overall inspection how to repair. I have a very strong notion that it's due to the loadRequest command from my UIWebview loading javascript, but I can't figure out what's wrong. Here's my setup: I have a tabbarcontroller that i programatically create with 4 view controllers: a table view, a mapview, another table view and a webview, respectively. the 1st tableview shows static data. the mapview shows annotations

UIWebview: WebThread EXC_BAD_ACCESS

醉酒当歌 提交于 2020-01-12 18:49:22
问题 I have a completely simple app: Show a web view with http://tv2.dk I'am using a storyboard, added the web view and set a property on my controller. To keep things simple i'am not setting a delegate. In viewDidLoad i call the web view with the url i want to load [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://tv2.dk"]]]; Each time the app starts up it crashes due to some error in a web thread worker, see this dump. libobjc.A.dylib`objc_msgSend: 0x1954f7bc0:

Detect long press on UIWebview and pop up a menu if I'm pressing on a link

有些话、适合烂在心里 提交于 2020-01-12 09:55:46
问题 Running into a problem with UIWebview, it doesn't seem to react to gesture recognizer. I would like to get a popover to appear whenever I do a long press on a link (or image) with different actions. Any help would be greatly appreciated =). Thanks. 回答1: You can detect clicking on a URL like this - (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType { if (navigationType == UIWebViewNavigationTypeLinkClicked)

Detect long press on UIWebview and pop up a menu if I'm pressing on a link

断了今生、忘了曾经 提交于 2020-01-12 09:53:58
问题 Running into a problem with UIWebview, it doesn't seem to react to gesture recognizer. I would like to get a popover to appear whenever I do a long press on a link (or image) with different actions. Any help would be greatly appreciated =). Thanks. 回答1: You can detect clicking on a URL like this - (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType { if (navigationType == UIWebViewNavigationTypeLinkClicked)

iPhone OS 3.2; PDF rendering; User Interaction

南笙酒味 提交于 2020-01-12 05:50:08
问题 I'd need to create a iPad-app which would be rendering multiple PDF-Files (one file contains one page). Each page should be scrollable, zoomable and if the user taps on a part of the PDF a website or photo gallery should popup. Currently i think i could do that either with: A. UIWebView Displays the pdf's nicely, scrolling and zooming works. But it looks like a lot of trouble to realize the clickable parts of the PDF. I don't know if i could use CGPDFContextSetURLForRect Getting the touch

How to reload a UIWebView?

耗尽温柔 提交于 2020-01-12 05:07:40
问题 I want to reload a UIWebView (including all labels and images) when a button is tapped. How can I do that? 回答1: - (void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; [webView reload]; } or NSURL *theURL = [NSURL URLWithString:@"http://www.OurLovingMother.org/Mobile.aspx"]; [webView loadRequest:[NSURLRequest requestWithURL:theURL]]; } 回答2: - (IBAction)buttonClicked { [yourWebview reload]; } Hope this helps 回答3: Note that if you load the content of your UIWebView using

Gesture recognition with UIWebView

十年热恋 提交于 2020-01-12 02:18:08
问题 I have set up some gesture recognition in an app that I'm building. One of the gestures is a single finger single tap, which hides the toolbar at the top of the screen. Works great except for one thing: a tap on a link causes the toolbar to go away, too. Is it possible to detect a tap that was not a tap on a link? Could I do this by seeing where the tap occurred, and only take action if it didn't occur on an html link? Is this is possible, a pointer to how to determine if a link was tapped