- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
BOOL bLoadRequest = YES;
if (this is the page you want to intercept)
{
bLoadRequest = NO;
// Push your new scene.
}
return bLoadRequest;
}
I simply want to represent another new view controller in storyboards if it returns NO.
But I can’t figure it out.
Can someone please help me with this part, “// Push your new scene.”?
It’s common practice to make your view controller also the delegate to your
UIWebView. So assuming your view controller is inside aUINavigationController, you could push your new view with:or if you’re not using a navigation controller:
Hope this helps…