Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/41.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
Iphone UIWebView没有';不要装!_Iphone_Ipad - Fatal编程技术网

Iphone UIWebView没有';不要装!

Iphone UIWebView没有';不要装!,iphone,ipad,Iphone,Ipad,我使用UIWebView加载一个本地html文件以获取其内容。但这似乎不起作用。那么原因是什么呢 CGRect tempRect= CGRectMake(0, 0, 160, 480); myWebView=[[UIWebView alloc]initWithFrame:tempRect]; myWebView.delegate=self;[myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithP

我使用UIWebView加载一个本地html文件以获取其内容。但这似乎不起作用。那么原因是什么呢

CGRect tempRect= CGRectMake(0, 0, 160, 480);
    myWebView=[[UIWebView alloc]initWithFrame:tempRect];
    myWebView.delegate=self;[myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:pathFileHttp]]];

我会再次检查您的应用程序是否可以访问pathFileHttp


另外,您是否已将myWebView添加到正在使用的parentview中?它是最前面的子视图吗?

ann错误?什么是pathFileHttp?关于名称。这是不对的。pathFileHttp是html本地文件的路径。它是存在的。