Ios UIWebView灾难-错误101

Ios UIWebView灾难-错误101,ios,cocoa-touch,uiwebview,Ios,Cocoa Touch,Uiwebview,UIWebView不会加载(错误101)以下URL: 我试过逃跑,但没有成功。请帮忙 试试这个: //Set the URL to go to for your UIWebView NSString *webAddressString = @"http://afrikaans.news24.com/Sci-tech/Nuus/Rwanda-gaan-Suid-Afrikaanse-wild-invoer-20111116"; NSLog(@"show webAddressString: %@"

UIWebView不会加载(错误101)以下URL:

我试过逃跑,但没有成功。请帮忙

试试这个:

//Set the URL to go to for your UIWebView
NSString *webAddressString = @"http://afrikaans.news24.com/Sci-tech/Nuus/Rwanda-gaan-Suid-Afrikaanse-wild-invoer-20111116";
NSLog(@"show webAddressString: %@", webAddressString);

//Create a URL object.
NSURL *weburl = [NSURL URLWithString:webAddressString];
[webAddressString release];
//URL Requst Object 
NSURLRequest *requestObj = [NSURLRequest requestWithURL:weburl];

//load the URL into the web view.
[aWebView loadRequest:requestObj];
错误101是操作无法完成。,这是由域未找到、网络问题甚至对象分配(从Google搜索)导致的。

请尝试类似操作

NSString *unencodedURLString = @"http://afrikaans.news24.com/Sci-tech/Nuus/Rwanda-gaan-Suid-Afrikaanse-wild-invoer-20111116";
NSString *encodedURLString = [unencodedURLString stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];

//Create a URL object.
NSURL *weburl = [NSURL encodedURLString];
//URL Requst Object 
NSURLRequest *requestObj = [NSURLRequest requestWithURL:weburl];

//load the URL into the web view.
[aWebView loadRequest:requestObj];

让它像这样工作,但不幸的是我不能硬编码urlsfound问题,字符串包含不可见的新行字符+1 omg,这也是我的问题!!我以为我疯了。最好更新您的问题以反映修复。如果你问了,我会回答这个问题。(几乎用+0跳过了这个问题)