5 // Created by Quang Anh Do on 30/05/2010.
6 // Copyright 2010 Quang Anh Do. All rights reserved.
9 #import "QAWebController.h"
12 @implementation QAWebController
14 @synthesize oAuthDelegate;
17 [oAuthDelegate release];
22 - (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {
24 if (![[[request URL] scheme] isEqualToString:@"internal"]) {
25 return [super webView:webView shouldStartLoadWithRequest:request navigationType:navigationType];
29 if ([[[request URL] host] isEqualToString:@"finish-auth"]) {
30 if (oAuthDelegate && [oAuthDelegate respondsToSelector:@selector(didFinishAuthorizationInWebViewController:)]) {
31 [oAuthDelegate performSelector:@selector(didFinishAuthorizationInWebViewController:) withObject:self];