1
votes

I call this :

    NSString *authLink = @"https://plus.google.com/share?url=http://stackoverflow.com";
NSURL *url = [NSURL URLWithString:authLink];    

[vkWebView loadRequest:[NSURLRequest requestWithURL:url]];

after I sent the text, UIWebView loaded my google+ wall. How hide webview and back to my app?

1
how do you display the UIWebView? when do you want to get back to you app? after the data has been displayed in the web view? after the user does some action? - sergio
if ([[URL absoluteString] isEqualToString:@"plus.google.com/"]) { [super dismissModalViewControllerAnimated:YES]; return NO; } call this in - (BOOL)webView:(UIWebView *)aWbView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType - Max

1 Answers

1
votes

You can watch the url that the UIWebView is trying to load by using the webView:shouldStartLoadWithRequest:navigationType: delegate metod.

See http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebViewDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIWebViewDelegate for details.

When you get the URL for the google+ wall, just hide / stop the UIWebView