uiwebview

iOS UIWebview Load local device HTML file path [duplicate]

徘徊边缘 提交于 2019-12-11 20:45:13
问题 This question already has answers here : How to load local html file into UIWebView (18 answers) Closed 6 years ago . I am developing one iOS application in which I want to load the HTML file on UIWebView , my html file path is as like below, iPhone HTML file path: /var/mobile/Applications/65A8E000-21A6-429E-90A0-6BF03BAB3EA5/SarkBuilderApp.app/SarkBuilerHtmlFile_new.html I want to load this iPhone device's HTML file path to UIWebView . How can I do this? Thank you very much for your quick

Json - iPhone app: uitableview and uiwebview

此生再无相见时 提交于 2019-12-11 20:39:01
问题 I am quite new to Xcode and Json. In my app, I have navigation through pages via tableviews (drill down). What I want to do now, is to use Json to create my tableviews and then when I select a cell in the uitableview, it will go to a website through the next page via a uiwebview. How will I do this? 回答1: Parse your json using a parser Create the parsed response as a data model for table view. You can use a Dictionary/array to keep things simple Implement the tableview delegate methods and get

Issue with UIWebView caching pages

匆匆过客 提交于 2019-12-11 20:18:10
问题 I'm loading a remote html page into a UIWebView, the page is held on my mac book pro using and made available via OS X's built in Apache server. I've noticed that if I load the page in the UIWebView, then make changes to the page and reload it then the changes are not reflected, hence it must presumably be being cached somewhere. I get this behavior even if I quit the app containing the UIWebView and re-launch it. Where is the web page being cached? Is it possible to force the UIWebView to

How can I let UIScrollView (pagingEnabled) to move 1.2 page each time?

笑着哭i 提交于 2019-12-11 20:13:08
问题 Ok. here is the story: I have a UIWebView in full screen, width = 768 It loads several images and those images are in one line, which means the UIWebView will scroll only horizontally. Now, I set the UIScrollView inside the UIWebView to pagingEnabled = YES. So the scroll on the UIWebView will move page by page. The problem is that every image's width is about 900. I won't scale them down and if I scroll the UIWebView, from the 2nd page on, always 132points of previous image will show. This is

Style inline text along with nested tags with XSLT

↘锁芯ラ 提交于 2019-12-11 20:10:10
问题 I have an XML structure that looks something like this. <root> <outer-tag> Some Text <inner-tag> Some more text </inner-tag> finally some more text </outer-tag> <outer-tag> .... </outer-tag> ... </root> How would the XSLT look like for the above structure? I am doing something like this, which I know is wrong. <xsl:for-each select="outer-tag"> <xsl:value-of select="."/> <b><xsl:value-of select="inner-tag"/></b> </xsl:for-each> And the output for this XSLT looks like Some text Some more text

Remove copy and define from UIMenuController

蹲街弑〆低调 提交于 2019-12-11 19:59:34
问题 I have UIWebView for displaying some articles. I need to select some text from UIWebView and use bookmark. So i'm using selection = [wbCont stringByEvaluatingJavaScriptFromString:@"window.getSelection().toString()"]; But when i longpress the UIMenuItem displays with copy,define. I read some doc and used canPerformAction: copy NO. But still it displaying. - (void)viewDidLoad { [wbCont loadHTMLString:webString baseURL:nil]; [self.view addSubview:wbCont]; NSMutableArray *items = [[

How to detect of tap gesture is from uiwebview or self.view?

折月煮酒 提交于 2019-12-11 19:44:10
问题 Hello everyone I have a uitapgesture on my view using the following code : UITapGestureRecognizer *tap= [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(TAPGestureRecognizer)]; tap.numberOfTapsRequired=1; tap.delegate = self; [self.view addGestureRecognizer:tap]; - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { return YES; } And I have a uiwebview as a

Facebook Comment box inside UIWebView doesn't have the right height

懵懂的女人 提交于 2019-12-11 19:29:10
问题 I am trying to load the following html inside a UIWebView. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : 'myAppId', status : true, xfbml : true }); FB.Event.subscribe("xfbml.render", function(response) { FB.Canvas.setSize(); }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0];

UIWebView in UITableView reloads everytime I scroll. How do I prevent it from reloading?

北城余情 提交于 2019-12-11 19:19:11
问题 Currently I have a UITableView that has a UIWebView in every cell . Each UIWebView is loading a unique embedded YouTube video. Is there a way to keep the UIWebView from reloading when scrolling. It looks cheaply developed when it scrolls on screen and is a white rectangle to loading a video thumbnail. I was looking into UIWebView caching but I don't know how I would go about caching the WebView to reuse it later. 回答1: You can try this differently, just define new table view cell for that

video embedded on a link not working on UIWebview with iOS6 simulator or device

岁酱吖の 提交于 2019-12-11 19:15:01
问题 does iOS 6 webview have an issue of presenting videos ? :( my code is a simple call to webview's loadRequest method: self.webview.scalesPageToFit = YES; [self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=3WEpUAQ7fa8"]]]; cosole says: [MPAVController] Autoplay: Enabling autoplay [MPAVController] Autoplay: Disabling autoplay for pause [MPAVController] Autoplay: Disabling autoplay [MPAVController] Autoplay: Ending background task