uiwebview

How to open .xlsx file on UIWebView in iPhone?

烈酒焚心 提交于 2019-12-11 14:17:04
问题 Is it possible to open the .xlsx file on UIWebView . I can't open .xlsx file on UIWebView . I got the following error message when I open the .xlsx file. Unable to Read Document. An error occurred while reading the document. I didn't face any issue when I open remaining file types like .xls, .doc, .txt and .pdf. 回答1: .xlsx cannot be opened in UIWebView, you can use .xls - it will work fine. 回答2: You can open .xlsx [webView loadData:urlData MIMEType:@"application/vnd.openxmlformats

How to display locally stored images with a UIWebview

蓝咒 提交于 2019-12-11 14:04:27
问题 When Connected: I have a simple HTML page with some image elements that reference images in a subdirectory as in (src="images/someimage.jpg"). This page displays fine when accessed remotely via an internet connection. When Offline: I store the above HTML page locally to the apps documents directory for offline viewing. The local HTML page is loaded and displayed fine with the UIWebView -- the PROBLEM is that the images in the HTML file are NOT displayed. Possible Cause: I guess the problem

NSHTTPCookieStorage Array - Parsing out the Value

旧城冷巷雨未停 提交于 2019-12-11 13:59:20
问题 I have data inside an array (NSHTTPCookieStorage)... NSARRAY *httpCookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:aHttpUrl]; I know for a fact that there are 3 cookies being stored (as I can see them in an NSLog). I don't know how to obtain 1 specific cookies value based on the "name". Example: <NSHTTPCookie version:0 name:\"username\" value:\"namehere\" expiresDate:2035-08-3 23:12:50 +0000 created:2015-08-08 23:12:49 +0000 (4.60768e+08) sessionOnly:FALSE domain:\

Trouble in creating Webview and Button on each iCarousal View

空扰寡人 提交于 2019-12-11 13:58:16
问题 I am using iCarousel for loading youtube videos .When we scroll the iCarousel respective youtube url is loaded and it plays the video.For this purpose I am using webview to load the urls.I also need one button on each Carousel view so that I can implement one action when respective carousel view is clicked even when video is loading when user taps at the carousel view it should respond to action. Carousel Methods: Edit: - (NSUInteger)numberOfItemsInCarousel:(iCarousel *)carousel { return 5; }

UIWebView passing username and password into a form

无人久伴 提交于 2019-12-11 13:52:14
问题 I have a UIWebView set up containing my universitys intranet page, my code will pass in my username fine (as it is a number) NSString *studentNumber = @"639909"; NSString *javaScriptNumber = @"document.getElementById('username').value=%@;"; javaScriptNumber = [NSString stringWithFormat: javaScriptNumber, studentNumber]; [webViewInt stringByEvaluatingJavaScriptFromString: javaScriptNumber]; However when i try to run the same code to fill in the password field, it will only work with numbers,

QuickTime player iOS 9 on UIWebView giving warning after play is pressed

一曲冷凌霜 提交于 2019-12-11 13:43:42
问题 I want to play a m3u8 link on UIWebView (iOS 9.2.1) when the page is loaded the play icon of the quickTime player appears when pressed (only on iPhone devices) the player fills the all screen and the log gives this warning : This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release. Stack:( 0 CoreFoundation 0x23e74123 <redacted> + 150 1 libobjc.A.dylib 0x2361ae17 objc

Intercept UITapGestureRecognizer for UIWebView

狂风中的少年 提交于 2019-12-11 13:36:36
问题 I'm trying to figure out how to intercept a click event on a UIWebView . It seems like the correct gesture is UITapGestureRecognizer , but I can't seem to get the view right. I haven't been able to find a solution in swift. My hierarchy is View -> UIWebView . My use case is to deploy a web app and have some custom actions based on the web view navigation. For example, being able to recognize navigation events in which I'd want to serve an interstitial ad or display a UINavigationBar . Thanks

UIWebView can't display PHP files

前提是你 提交于 2019-12-11 13:16:20
问题 I am using a UIWebView to display local php file, but id shows only "undefined" why ? 回答1: how do you plan to serve the php file in iphone? Unless there is an internal web server, you cannot view a php file from a web view. 回答2: Your PHP file being a local file to the iPhone has no way of being executed for there is no web server set up. 来源: https://stackoverflow.com/questions/8326210/uiwebview-cant-display-php-files

UIWebview wont Display Https (iPhone)

喜你入骨 提交于 2019-12-11 13:14:37
问题 So i wrote up a UIWebView but when i try to load an https page it wont load... here is my .m page for the WebView. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization. } return self; } */ // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [webView loadRequest:[NSURLRequest requestWithURL:[NSURL

If UIWebview url is equal to

删除回忆录丶 提交于 2019-12-11 12:47:36
问题 I got a UIWebView called "homeview". Everytime someone is browsing the UIWebview I want to check if the page url is "http://www.website.com/cart" and then change the tab controller to the second tab. So I did it like this: - (BOOL)webView:(UIWebView *)homeview shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { NSString *URLString = [[request URL] absoluteString]; if ([URLString isEqualToString:@"http://www.website.com/cart"]) { self