uiwebviewdelegate

Properly force or allow Landscape mode for Youtube embedded video in iOS 8 without NSNotificationCenter

做~自己de王妃 提交于 2019-12-05 09:13:42
I am having issues of capturing when the youtube player will enter in fullscreen or exit fullscreen in iOS 8 because these notifications were removed UIMoviePlayerControllerDidEnterFullscreenNotification and UIMoviePlayerControllerWillExitFullscreenNotification for this version OS version. Because my app project is set to be only in portrait mode the video won't rotate to landscape mode when is playing which is really not too user friendly when watching a video on your device. Usually the user would like to watch the video either in portrait mode or landscape mode when the video enters in

UIWebView and timeouts

不羁的心 提交于 2019-12-05 06:22:35
I'm using a UIWebView to display some content. Within this content the user can navigate through a bunch of sites which are being loaded using AJAX. One step on this sites requires quite some time. Since I didn't find anything about a timeoue for UIWebView I tried to set it on the initial NSURLRequest it loads. Unfortunately this does not seem to do anything. I'm not quite sure if I'm supposed to set the timeout myself? Is there anything I'm missing? Does the UIWebView override my timeout? I'm a little bit confused on this so any help would be appreciated. :) Best –f Update I built a test

How to find last load of UIWebView(Ready State 4)

天大地大妈咪最大 提交于 2019-12-05 02:12:44
I have a problem with the didFinishLoad method in UIWebView that is keeps firing. I want to try the estimatedProgress solution , however I dont know where to find those frameworks unfortunately. I am running Mountain Lion and using the latest version of XCode. Also, for the UIWebView firing multiple times, is this the best way to go or are there new methods. There seems to be a javascript answer on SO, however that did not work for me. That was dated back in 2009, and I hear that Apple rejects any app that uses a private API. Please help me out here! Thanks Everybody! What about keeping track

UIWebView content height not accurate in scrollview.contentsize

ⅰ亾dé卋堺 提交于 2019-12-05 02:11:06
I am trying to scroll to a particular page in a pdf document I have loaded in a UIWebView. I am able to do this without a problem in iOS 5 using: pageHeight = webView.scrollView.contentSize.height / numberOfPages; [[webView scrollView] setContentOffset:CGPointMake(0,pageNumber*pageHeight) animated:YES]; This only works however if the page has been loaded into the view already and the scroll to is triggered by a user action. For the case where I want to load a new pdf into the webview to a specific page, I am having trouble. I am requesting the load of the new pdf, and then doing something like

How to log into web site using uiwebview with swift?

非 Y 不嫁゛ 提交于 2019-12-04 14:35:18
I want to try to log into a web page using UIWebView in an ios applicaiton. However, I do not know how can I do this. I am showing web site with let url = NSURL(string: "http://m.falalem.com") let request = NSURLRequest(URL: url!) webView.loadRequest(request) I want to log into this page using my username and password parameter. Login Page -> http://m.falalem.com/Login After login page -> http://m.falalem.com/User-Info How can log into this page using uiwebview?? Please help! Logging into a webpage in general (using JS, PHP, etc.) uses a POST request, right? Specifically on your website, for

Listen to all requests from UIWebView

点点圈 提交于 2019-12-04 10:42:51
I can intercept the initial load request from a UIWebView with: (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType. How do I log all the requests from the page I'm loading? Update: Another option is to use NSURLProtocol to hear requests the application makes, including all the ones from the web view. I will suggest a creative solution. This is not really what you want, but since that is not really possible at this point with the SDK, this is the only possible solution. @interface PrintingCache :

How to enable “select all” in UIWebView in an IPhone App?

狂风中的少年 提交于 2019-12-04 03:54:55
问题 I am writing an IPhone application which embeds a UIWebView. There are various safari like features like navigation, etc. One of the tasks I am looking for is to present a "select all" option when the user selects on a piece of text on the web view. Currently, I only see a "copy" option. Is there an easy way to enable the "select all" menu item? I have ofcourse tried adding a menu item to the shared menu controller but that doesn't necessarily implement the original safari "select all"

how does one check if UIWebView is empty or not

孤街醉人 提交于 2019-12-03 13:57:01
I need to check if a webview when completed loading has any content or not. What I require is simple. Its a small webview strip at the bottom of my pages (like an advert) I call NSURLRequest *request=[NSURLRequest requestWithURL:adURL]; [gWebView loadRequest:request]; I get the callback -(void)webViewDidFinishLoad:(UIWebView *)webView { But in my scenario the webview shall return empty and sometime it shall have data. I do not want to show the webview if my server php file returned nothing. How can I verify that I received an empty page in the callback (or any other way)? Jano If you are

UIWebView: webViewDidStartLoad/webViewDidFinishLoad delegate methods not called when loading certain URLs

◇◆丶佛笑我妖孽 提交于 2019-12-03 08:48:11
问题 I have basic web browser implemented using a UIWebView . I've noticed that for some pages, none of the UIWebViewDelegate methods are called. An example page in which this happens is: http://www.youtube.com/user/google. Here are the steps to reproduce the issue (make sure you insert NSLog calls in your controller's UIWebViewDelegate methods): Load the above youtube URL into the UIWebView [notice that here, the UIWebViewDelegate methods do get called when the page loads] Touch the "Uploads"

UIWebViewDelegate: webViewDidFinishLoad not called during in-page navigation

我与影子孤独终老i 提交于 2019-12-03 03:33:53
I have an app where users can navigate a pile of locally stored HTML files. I have a UIWebView , configured up correctly with a UIWebViewDelegate . Usually, when the user follows a link, shouldStartLoadWithRequest is called, followed by webViewDidFinishLoad a bit later. But, if the link is pointing to an anchor on the same page as the one which is currently displayed, only shouldStartLoadWithRequest is called. webViewDidFinishLoad does not fire. In a sense, I see that this might be expected behaviour, because in-page navigation should not require a page reload. However, I really need a place