Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c UIWeb页面未加载_Objective C_Xcode_Ios4_Uiwebview - Fatal编程技术网

Objective c UIWeb页面未加载

Objective c UIWeb页面未加载,objective-c,xcode,ios4,uiwebview,Objective C,Xcode,Ios4,Uiwebview,我正在尝试加载一个基本网页,但它没有加载。这有点奇怪 我有此代码(此代码无效) 但是如果我尝试 [itemSummary loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://westminsteriphone.wordpress.com/2011/08/23/another-blog-post/"]]; 它起作用了这就是为什么第一个示例不加载试试这个 NSString *test = [item obj

我正在尝试加载一个基本网页,但它没有加载。这有点奇怪

我有此代码(此代码无效)

但是如果我尝试

[itemSummary loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://westminsteriphone.wordpress.com/2011/08/23/another-blog-post/"]];
它起作用了这就是为什么第一个示例不加载

试试这个

 NSString *test = [item objectForKey:@"link"];
    NSLog(@" %@",test); // returns http://westminsteriphone.wordpress.com/2011/08/23/another-blog-post/
[itemSummary loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",text]]]]; 
[itemSummary loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",[item objectForKey:@"link"]]]]]; 
试试这个

 NSString *test = [item objectForKey:@"link"];
    NSLog(@" %@",test); // returns http://westminsteriphone.wordpress.com/2011/08/23/another-blog-post/
[itemSummary loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",text]]]]; 
[itemSummary loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",[item objectForKey:@"link"]]]]]; 
如果你在不同的函数中使用这两行,那么就这样做

 function 1

 NSString *test = [[NSString alloc]init];

 test =[NSString stringWithFormat:@"%@",[item objectForKey:@"link"]];


 return [test autorelease];



 function 2



 [itemSummary loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:test]]];  

ddi您是否尝试使用loadRequest行上的breakbpoints进行调试??如果没有,请检查测试在尝试加载请求时具有什么类型的值