0
我有兩個帶有UIWebViews場景的視圖控制器。主要的MainViewController應該調用第二個,稱爲ViewController,並在用戶使用PostPicPopUp鏈接到它時調出該場景。 在MainViewController我:在shouldStartLoadWithRequest中調用視圖控制器
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
NSURL *urL=request.URL;
NSString *urlStr=[urL absoluteString];
//NSLog(@"URLL %@",urlStr);
if ([urlStr rangeOfString:@"PostPicPopUp"].location == NSNotFound) {
return YES;
} else {
return NO;
}
}
所以我需要你的代碼之前
return YES