Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 27th, 2012  |  syntax: None  |  size: 0.50 KB  |  hits: 313  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. iOS 5 UIWebview Delegate: WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction
  2. -(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
  3.     if(decision logic){
  4.         MyViewController *vc = [[MyViewController alloc] init];
  5.         [self.navigationController pushViewController:vc animated:YES];
  6.         [vc release];
  7.         return NO;
  8.     }
  9.  
  10.     return YES;
  11. }
  12.        
  13. [webview stopLoading];