Created
June 29, 2012 00:32
-
-
Save AnuragMishra/3014942 to your computer and use it in GitHub Desktop.
UIWebView black patch test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { | |
NSLog(@"Me called"); | |
return NO; | |
} | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
// Override point for customization after application launch. | |
self.window.backgroundColor = [UIColor whiteColor]; | |
UIWebView *webView = [[UIWebView alloc] initWithFrame:self.window.bounds]; | |
webView.delegate = self; | |
NSURL *url = [NSURL URLWithString:@"http://www.google.com"]; | |
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url]; | |
[self.window addSubview:webView]; | |
[self.window makeKeyAndVisible]; | |
[webView loadRequest:urlRequest]; | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment