uiwebview

how to use windowScriptObject on the iPhone?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-29 08:17:54
问题 Greetings! I was wondering how I could use javascript code on an iPhone application I was developing. this tutorial illustrated how to use windowScriptObjects for Cocoa application. However, I have been unable to locate something similar for UIWebViews. does this functionality actually exist in Cocoa touch? and if yes, could anyone point me to the right direction as to how I might start using it. thank you once again 回答1: Like rpetrich said, this is Non-Public API so the windowScriptObject

iPhone Paypal in UIWebView Appstore approval process

混江龙づ霸主 提交于 2019-12-29 07:12:31
问题 My application has paypal integration. I have read in many threads, they stated that paypal integration will cause the application to reject from app store. I am going to integrate paypal in uiwebview.It will be approved by App store? My application type is just logging in and post their ads to other users. For each ads they have to pay. Please help me out it has to be in appstore in next few days. I am reaching my deadline. Thanks in advance. 回答1: I think it depends what you are selling in

Transition to iOS 7: correct viewport setting for jQuery/iPhone Webapps viewed on iPads

偶尔善良 提交于 2019-12-29 03:35:51
问题 We have an app with essentially one UIWebView which is set to "iPhone App" in XCode. Until now all worked fine, but using the iOS 7 iPad Simulator the App now appears in "Full Screen" immediately, which would not be the problem, but the WebView also appears to be zoomed in. I only see the upper right 1/4 of the website thats loaded and have to scroll to see the rest. We use jQuery mobile 1.3.1 in the application. edit I found the error. It seems the semantics of the viewport meta-element

UIWebView Keyboard - Getting rid of the “Previous/Next/Done” bar

╄→尐↘猪︶ㄣ 提交于 2019-12-29 03:12:07
问题 I want to get rid of the bar on top of the keyboard that appears when you focus a text field in a webview. We have some other ways of handling this and it's redundant and unnecessary. webview keyboard bar http://beautifulpixel.com/assets/iPhone_Simulator-20100120-152330.png If you hit this problem , make sure to head over to https://bugreport.apple.com and duplicate rdar://9844216 回答1: - (void)viewDidLoad { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector

Display local UIImage on UIWebview

你离开我真会死。 提交于 2019-12-28 13:57:10
问题 My setup: I have a webview in my iPhone app, going to www.mysite.com. Trials If I set "backgroundcolor uicolor clearcolor" to my webview and draw an uiimage behind my webview, it won't scroll with my webview! My problem: I would like the image to with the webview. Also, this image should be stored in the iPhone app and not on the webserver (Of course, if I put the image on the webserver I can simply draw it as background with CSS). What is the best way to access this image via html/javascript

UIWebView not go to didFailLoadWithError when webLink not found?

我们两清 提交于 2019-12-28 13:48:26
问题 I use UIWebView to load web from a webLink and UIWebViewDelegate to control error state: [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:webLink]]]; - (void)webViewDidStartLoad:(UIWebView *)webView{ NSLog(@"START LOAD"); } - (void)webViewDidFinishLoad:(UIWebView *)webView{ NSLog(@"FINISH LOAD"); } - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{ NSLog(@"ERROR : %@",error); } But when webLink not found, it NOT go to didFailLoadWithError , it go

Reliable way to compare two NSURL or one NSURL and an NSString?

让人想犯罪 __ 提交于 2019-12-28 11:47:06
问题 I recently had a problem when comparing two NSURLs and compare one NSURL with an NSString(which is a URL address), the situation is I got an NSURLRequest from somewhere, I may or may not know the URL address it points to, and I have an URL NSString, say "http://m.google.com", now I need to check if the URL in that NSURLRequest is the same as the URL string I had: [[request.URL.absoluteString lowercaseString] isEqualToString: [self.myAddress lowercaseString]]; this returns NO as the

Adding a header view to a UIWebView similar to Safari and Articles

穿精又带淫゛_ 提交于 2019-12-28 08:09:08
问题 I'd like to add a header view to an UIWebView similar to the address/search bar in MobileSafari and the excellent Articles.app by Sophia Teutschler. More precisely, I'd like to create a "pull to fix orientation" view above a UIWebView, just like in Articles. Articles does use a UIWebView, so it seems to be possible. Is there a way to accomplish this without having to embed the UIWebView into a UIScrollView and updating its size all the time, as described in this article? Apparently, I do need

Disable Scroll on a UIWebView allowed?

十年热恋 提交于 2019-12-28 07:58:18
问题 I have to show a web article with a UITableView under the article. The only option I found was to display the article in a UIWebView in the tableView header. In order to do that I have to get the height of the webView content and I have to disable scrolling for the webView. I found two solutions to disable scrolling: for (id subview in webView.subviews) if ([[subview class] isSubclassOfClass: [UIScrollView class]]) ((UIScrollView *)subview).scrollEnabled=NO; or in JavaScript: <script type=

Prevent caching of .css files in UIWebView loaded from disk

笑着哭i 提交于 2019-12-28 06:32:11
问题 In the iPad project I'm working on I've got a UIWebView inside of the app which displays a .html file which links to a .css file, i.e. <link rel="stylesheet" href="style.css" type="text/css"> These files are stored locally on the iPad but are fetched from a remote server. I've noticed that UIWebView caches the .css file more or less indefinitely, and refuses to load the new file whenever I change it. I've once changed the name of the file just to get it to reset, but that's unacceptable in