#pragma mark -- #pragma mark UIWebViewDelegate -(BOOL)webView:(UIWebView*)webViewshouldStartLoadWithRequest:(NSURLRequest*)requestnavigationType:(UIWebViewNavigationType)navigationType{NSString*requestString=[[requestURL]absoluteString];NSArray*components=[requestStringcomponentsSeparatedByString:@":"];if([componentscount]>1&&[(NSString*)[componentsobjectAtIndex:0]isEqualToString:@"objc"]){if([(NSString*)[componentsobjectAtIndex:1]isEqualToString:@"alert"]){UIAlertView*alert=[[UIAlertViewalloc]initWithTitle:@"Alert from Cocoa Touch"message:[componentsobjectAtIndex:2]delegate:selfcancelButtonTitle:nilotherButtonTitles:@"OK",nil];[alertshow];}returnNO;}returnYES;}