uiwebview

hide toolbar at bottom of UiWebView when scrolling down

久未见 提交于 2019-12-10 23:15:43
问题 I have the following code that successfully hides the bottom toolbar when NOT at the top of the web view as shown in attached images. (below) What I am trying to do is hide the toolbar completely and then expand the web view to take up the extra space (similar to how Safari does this). Any help would be great! - (void)viewDidLoad { [super viewDidLoad]; if (self.url != nil) { [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[StoreWebViewController

Linking external JS in UIWebView in iOS 5

你离开我真会死。 提交于 2019-12-10 22:58:09
问题 I am loading an html that includes an external JS like this, <script src="external.js" / > This used to work fine, till iOS4.3, but suddenly stopped working in iOS5.0. Based on my understanding it is because UIWebview in iOS 5 now supports html5 which specifies that you "must" put a closing tag instead of relying on '/' (self-closing?) that we are used to put at the end when there is no content in tag. Let me know if my understanding is correct? 来源: https://stackoverflow.com/questions/7820934

Display a .pdf in an iOS app without downloading it from the internet

风流意气都作罢 提交于 2019-12-10 22:33:08
问题 I'm looking to package a .pdf file with my app so that users can view it on one of the app's tabbed UIViews. Most of the posts I've read explain how to display a .pdf that must be downloaded first from the internet. My question is: how do you access a .pdf that is packaged with the app and display it on a UI(Web)View (with no internet access/download required)? EDIT: This snippet was the key (where "ReadFile.pdf" was .pdf added to the project): NSString *urlAddress = [[NSBundle mainBundle]

Not automatically login to Google+ using UIWebView (iOS)?

China☆狼群 提交于 2019-12-10 22:23:41
问题 I have a question about authentication with UIWebView. I want to login in webview in plus.google.co I sign in in google plus one time as shown in https://developers.google.com/+/mobile/ios/sign-in When user go to google+ page again in UIWebView then program should be automatically logged in and save the user's session. But in fact it is not keep logged in.How can i keep user logged in for google+ although user is one time sign in for Google+ in my application. I also checked condition for

Delay in loading a HTML string into a UIWebView

自作多情 提交于 2019-12-10 22:18:09
问题 I have two view controllers inside a navigation controller. The 1st view controller has a menu with a button. Pressing this button moves to the 2nd view controller and loads a html string into a UIWebView. Nothing else is being loaded to the webview, just a simple NSString with html code in it. Essentially I'm making a flip card (two views) with the webview as a subview of one of the uiviews. Here's the code: containerView = [[UIView alloc] initWithFrame:CGRectMake(20, 20, 280, 280)]; [self

Get Specific elements from HTML in UIWebView

馋奶兔 提交于 2019-12-10 22:14:05
问题 how can i get specific elements from html page if i have this nsstring with this value <body style="background-color: 3399CC;font-size: 200.5%;font-family:monospace;font-style:oblique;"> <div id="1" align="center" style="padding-top: 10%;" > <h1 style="color: #FFFFFF">fawazapp</h1> <p style="color: #C0C0C0;"> bbb</p> <p style="color: #FFFFFF;">aaaaaaaaa</p> </div> <div id="2" align="center" style="padding-top: 10%;" > <h1 style="color: #FFFFFF">fawazapp</h1> <p style="color: #C0C0C0;"> bbb</p

Handle control buttons of UIwebview youtube video player

若如初见. 提交于 2019-12-10 22:05:20
问题 I'm creating a youtube videos player which can play a list of youtube video ( given a list of video id). I embedded youtube video into a UIWebview as following: NSString *htmlFormat = @"<html><head><body style=\"margin:0\"><embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" width=\"40\" height=\"30\"></embed></body></html>"; NSString *url = [NSString stringWithFormat:@"http://www.youtube.com/watch?v=%@", videoId]; NSString *html = [NSString stringWithFormat:htmlFormat, url];

loadHTMLString won't fire while UIScrollView is scrolling

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 21:53:25
问题 I'm trying to lazy load UIWebViews inside a UIScrollView . Every time the user scrolls, the WebViews frames are updated and new content SHOULD be loaded. And that's exactly where I'm having trouble. The repositioning works well, but the new content (local NSStrings , which are called using loadHTMLString ) does not appear until I stop scrolling the ScrollView. I've read this thread already: NSURLRequest won't fire while UIScrollView is scrolling. Getting some inspiration from that, is there

What is the difference between source code and DOM?

孤街浪徒 提交于 2019-12-10 21:44:11
问题 In my app I want to process Google Translate definitions, like definition for the word "song" When I check returned http message, it does NOT contain the "short poem" expression. But in DOM tree view in Safari I can see the "short poem" info. This is because after loading page some JavaScript code do some magic? How would you get DOM tree in an iOS app? UIWebView can do such a magic? 回答1: The notions between a page’s source and a page’s DOM are similar, but different. The source is the raw

jQuery offset() method in CSS 3 multicolumn

风格不统一 提交于 2019-12-10 21:39:33
问题 Got some serious issue here, I'am working on an iOS App which has to display an html page in a UIWebView over several columns using CSS multicolum module. I'm adding the following CSS rule to the page to accomplish the multicolumn padding: 0px; height: 850.000000px; -webkit-column-gap: 0px; -webkit-column-width: 620.000000px; Then I need to find the absolute position on screen for some text in the page. The problem is that any call of the offset() method from jQuery works fine EXCEPT the one