My code must update web view and download web site. But it doesn't because URLWithString
returns null. How can I solve this problem? stringByAddingPercentEscapesUsingEncoding
is already deprecated.
-(void) setWebViewMain:(NSString *) link {
// link = @"http://www.rbc.ru/society/05/09/2017/59ae2dfe9a794753f05e3e06"; if this string uncomment code is working
NSURL *url = [NSURL URLWithString: link];
NSLog(@"%@",url); // here url is (null)
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:requestObj];
[self.webView reload];
}