Resign Keyboard from UIWebView when i'm in google maps - iphone

I'm opening an UIWebView from my iPad Application as a PresentModalViewController and opening google maps "http://maps.google.com/maps?q=London" , everything is working fine but the only problem is when i search places source and destination and click on arrow button the keyboard is not resigning, but it is working fine when i open it in safari.
How to resign my keyboard when i click arrow button inside UIWebview?
Any help is thanks in advance.

I would suggest implementing delegate UIWebViewDelegate and catching the event when the page is being reloaded. I am not sure which arrow button you mean, but I believe that when you click that button the UIWebView loads the previous web page. At that point webViewDidStartLoad should be called, in which you can try to call resignFirstResponder on UIWebView.

Related

xcode iphone app problem with app not closing on ad click

I have a webview inside mainwindow.xib. Te webview shows an admob ad and when clicked it is supposed to close the app and open the app store. For some reason this is not happening. When the ad is clicked nothing happens. Can this be due to the webview being inside main instead of a viewcontroller? If not then what can be causing this?
It's possible that some other view is intercepting the touches, the UIWebView has user interaction disabled, or the view the UIWebView is a child of has user interaction disabled.
It's hard to say exactly without some more information. Can you take a screenshot of how the mainwindow.xib is laid out?

open linkin UITextView in my UIWebView on another tab

i have searched this site back and forth withoutfinding a clear answer for what i want.
i have a detail view which is presented after pressing a cell in a table view, this has a uitextview which displays the content of the cell. in most cases this text will have a url link, which when pressed opens the page in safari.
what i want to do is open the link in a UIWebView which i hae on another tab within my app, is it possible to push this link onto my uiwebview insteadof opening safari?
i am fairly new to coding, all self taught. so if you could explain with some detail itwill be appreciated.
Many thanks in advance
mike
See iPhone SDK - opening links in a UITextView in a web view

problem with iOS 4.2 when user press the list view item to go to UIwebview page and the navigation button disappears on the second visit

My app is a Navigation based application. The main menu contains the list view items. if I clicks one of them, it goes to next view which in this case take me to UIwebview embedded web site. Everything is looking great. I can view the content of web page, the navigation control back button which takes to the main menu if I press it. However, I'm having issue when I try to go back to main menu if i visit that subview the second time. It loads the content of UIwebview web page, but the navigation button is gone and won't let me go back to main menu. This problem only appears on latest iOS 4.2 version. Otherwise it works great on 3.1 to 4.1. I would appreciate any hints or inputs.
Note this seems not working for subview using UIWebview embedded web content. I don't have any issue with other subviews
Can you show us the code ? Did you try this: self.navigationItem.hidesBackButton = NO; in viewDidLoad method where you are adding UIWebView to your view..

When using a view with a webView in, the shake gesture is not always detected

This is my first post and I have looked all over for a week or so now so I'm not sure if there is an answer out there or not.
I have an iPhone application (my first one) that has a view that includes a UIWebView.
The view responds to the shake gesture and then loads a modal view controller that includes navigation buttons for the webView that depend on whether the webView can go back/forward etc.
The problem is that the shake gesture works fine most of the time but, depending on what is displayed in the webView, the shake sometimes fails to register, whenever it fails I just have to locate and tap on a blank area of the UIWebView or click on the top navigation bar and shake again and this will usually register.
What can be causing this? Is it something to do with UIWebView?
OK, well i've found the solution for this.
Add the following code to the view that contains the UIWebView
[self becomeFirstResponder];
i chose to put this at the very end of the - (void)webViewDidFinishLoad:(UIWebView *)webView method
This seems to work OK on the testing i've done so far.

Dismissing pickers and keyboards invoked by a UIWebView

I am implementing an in-app browser using UIWebView, that shows an 'action' button up-top that - when tapped - scales the UIWebView and allows the user to perform some other actions.
If, however, at the point of tapping this 'action' button, the user were entering some text on the webview, or using a picker to select an option from a drop-down list, then the webview gets scaled without dismissing the keyboard/picker. Apart from being ugly, this also obscures my main view and controls.
So is there a way to make a UIWebView dismiss all associated input controls, such as keyboards/pickers, when asked to?
I tried using [myWebView resignFirstResponder] but that didn't work. Any ideas? Thanks.
Was able to do this by using
[myWebView endEditing:YES]