0

I have a url like unsafe:customscheme://customResourceSpecifer. I want to remove the unsafe prefix from it and load the rest of url, currently I am doing like this, is there any other way?

-(BOOL) webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
    if ([request.URL isUnsafeURL])
    {
        [self.webView loadRequest:[request.URL URLbyRemovingUnsafePrefix]];
        return NO;
    }
    return YES;
}
hariszaman
  • 8,202
  • 2
  • 40
  • 59

0 Answers0