Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>based on your additional comments below, i've edited this answer to focus on the second solution i had originally proposed:</p> <ul> <li>in one app that i have, in which i go to visit external web sites, in my storyboard, i have created a view containing a UIWebView and a UIButton that is a back button. you could do this and just have the UIWebView load the map as you would like and go from there.</li> </ul> <p>the .xib would look something like the following … paying special attention to the fact that the <strong>done</strong> button is last in the subview order so that it can sit on top of the webview if desired (yes, the webview could be made to take up 100% of the superview real estate, and the button could sit on top of it; it just does not in this example app i used) (and ignore the background image; in the example app i used to take this screenshot, it is used behind a partially transparent webview; if this is desired, make sure it appears first in the subview order of the .xib view so that it is "behind" all other subviews).</p> <p><img src="https://i.stack.imgur.com/fpO8u.png" alt="enter image description here"></p> <p>and the code you would need for this would be in the view controller associated with this .xib, and would look something like the following:</p> <pre><code>@interface WebGoogleMapInUIWebViewViewController () &lt;UIWebViewDelegate&gt; @property (nonatomic) int backCount; #if __IPHONE_OS_VERSION_MIN_REQUIRED &gt; __IPHONE_4_3 @property (readonly, weak, nonatomic) IBOutlet UIWebView *webView; #else @property (readonly, unsafe_unretained, nonatomic) IBOutlet UIWebView *webView; #endif @end @implementation WebGoogleMapInUIWebViewViewController @synthesize webView; // … UIViewController life-cycle code and all other code goes here … #pragma mark - Actions - (IBAction)done:(id)sender { if (self.webView.canGoBack) // relying on false for a nil webView [self.webView goBack]; } @end </code></pre> <p>this solution should allow you to stay inside of your app, and then if you do get to the dialog asking for the location, the result should be immediate and apply back only inside of your app.</p> <p>i know this doesn't solve the problem the way you've stated it, but it might give you the behavior you want.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload