ios - Unable to open redirected URL in UIWebview -
I am using a Google RSS feed where I am getting some URL:
This page does not load when I try to open it in uiwevview
If I open it in Safari then it says that can not open the Safari page Because too much redirection happened Please suggest. Your URL may not be valid, use the following code to verify it:
NSString * strURL = @ "https://www.google.com/url?q=http://www.mcphersonsentinel.com/article/20140422/SPORTS/140429875/10084/SPORTS& ct = ga & cd = CAIyAA & amp; USG = AFQjCNG9pfoDddHHNV0gJaspzR1jv1ffKA "; NSString * urlRegEx = @ "(http | https): // ((\\ w) * | ([0-9] *) | ([- | _]) *) + ([\\. | /] ( (\\ W) * | ([0-9] *) | ([- | _]) *)) "; NSPredicate * urlPredic = [NSPredicate predicateWithFormat: @ "self-matching% @", urlRegEx]; BOOL isValidURL = [URL with urpdic evaluation: strURL]; If (isValidURL) {strURL = [strURL stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; NSDRAUL * Website URL = [NSURL URL with string: string]; NSURLRequest * urlRequest = [NSRR request request with url: website URL]; [Self. WebWorld Load Request: urlRequest]; } And NSLog ("URL" is not valid.);
Comments
Post a Comment