uiwebview

Same WebView on every view

大城市里の小女人 提交于 2019-12-10 15:22:34
问题 Basically i have a WebView on SecondViewController and I wish for the WebView to be visible on every view like a tab bar and fully controllable on each view. Please note the WebView will be on a webpage with a online slideshow so I cannot simply reload on each view Also in the SecondViewController I have - (void)webViewDidFinishLoad:(UIWebView *)YouTubePlayer { 回答1: I'd just set up a singleton UIWebView and add it to each view-controller-view when that view controller is about to become

How to make iOS UIWebView display a mobile website correctly?

核能气质少年 提交于 2019-12-10 15:02:32
问题 I am new to iOS app development and I just tried using UIWebView to display a mobile website in my app and was not quite successful. What I did is just some minimal Xcode project configuration and coding that I found during some Googling efforts: Create a new iOS application project in Xcode using the Single View Application template. Drag a Web View from the Object Library to the View Controller scene of Main.storyboard . While holding down the Control key, drag the Web View from the View

Correlate NSURLRequest with UIWebView

ぃ、小莉子 提交于 2019-12-10 14:47:14
问题 In iOS, I'd like to be able to associate an NSURLRequest -- any NSURLRequest , whether a navigation request or image or stylesheet request--with the UIWebView that sent it. This seems to call for the implementation of an NSURLProtocol subclass to capture and analyze requests as they come through. However, I can't find a way to correlate a request with its web view, and NSURLProtocol only seems to understand NSURLRequest s. This would be fine for navigation requests, as I could make the

Error loading external URL in Phonegap 2.5

青春壹個敷衍的年華 提交于 2019-12-10 14:43:49
问题 I created a new Phonegap 2.5 project from scratch, and I've been trying to load an external URL in it, but I keep getting input boxes popping up on startup before loading the actual URL. I first get a pop-up with the URL of the website, then in the input box it says "DeviceInfo","Device652321624". If I click Cancel, it pops up 2 more times before loading the website. On the website itself, it loads some relative URLs, but others cause the entire page to refresh and the input boxes to pop up

iOS portrait only app returns from UIWebview youtube in landscape

孤街浪徒 提交于 2019-12-10 14:24:57
问题 I'm creating an iOS application and i've encountered the following problem: The project is set to be a portrait mode application. I have a UIWebview , which loads a webpage with a youtube video in it. When the video is clicked it starts in the youtube player . When the video changes to landscape mode and 'done' is clicked it returns to the UIWebview showing it in landscape . I do receive a NSNotification when the video is finished but I'm not able to force portrait mode. This should not be

Tap and hold to save image in UIWebview

感情迁移 提交于 2019-12-10 12:25:42
问题 In my app I have a UIWebView that shows a list of pictures. Right now, when someone taps and holds their finger on a picture, the option comes up to copy that picture. Is there a way to make it so that, when someone taps and holds, the option to save that picture appears? Any ideas are welcomed! 回答1: You need to detect the long tap. For that you need to add: @property (nonatomic,strong) UILongPressGestureRecognizer *lpgr; and in your view did load: self.lpgr = [[UILongPressGestureRecognizer

UIViewControllers and UIWebView

こ雲淡風輕ζ 提交于 2019-12-10 12:15:29
问题 I am a newbie at iPhone development and have a question, which may end up helping understand this concept in general. Basically, I have UIViewController which loads up a view with a bunch of stuff. Now I want when a user clicks on a button, to load up a different view, which happens to be a webView. Now, I want the weview to load up a different url depending on which button was pressed in the original view. how do i go about doing this? Basically in my head I thought i could load and swap the

Keyboard does not appear in the UIWebView on the UINavigationController

时光毁灭记忆、已成空白 提交于 2019-12-10 12:07:03
问题 I have a UIWebView in UINavigationController. I have a TableView, When the clicks cell of the table, it goes to WebView, but when user clicks textfield in webview, keyboard will does not show up. Why does not show up? Which part of code is required? This code is part of the transition to UIWebView below. UIViewController *wvc = [[UIViewController alloc] init]; UIWebView *uiWebView = [[UIWebView alloc] initWithFrame: CGRectMake(0,0,320,480)]; [uiWebView loadRequest:[NSURLRequest requestWithURL

UIWebView white screen on every launch while preloading all tabs

戏子无情 提交于 2019-12-10 11:41:03
问题 Before I present my issue, I want to mention that I tried looking for solutions here and here. I am creating a hybrid application which uses native UIWebView for rendering the responsive designed web application. Following is the issue description : 1. I have a UITabBarController . 2. Each of the tab has a UIWebView . 3. I have to preload all tabs. 4. I am showing a UIActivityIndicator till the content loads on the first tab. 5. White screen appears for about 8-10 seconds and then the content

UIWebView: Why does the request not time out when using a non-existant hostname?

我怕爱的太早我们不能终老 提交于 2019-12-10 11:24:39
问题 My situation is this: I have a UIWebView which makes a POST request to a URL where the hostname is provided by the user. When the hostname does not exist, I need to timeout so that I can alert the user to say that they should check the their settings. What is happening: I make a request like this: NSString *theURL = [NSString stringWithFormat:@"https://%@%@", _hostname, LOGIN_PART_URL]; NSString *body = [NSString stringWithFormat:@"Username=%@&Password=%@", _username, _password];