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
将html页面加载到UI web视图iphone SDK 4.0_Iphone_Objective C - Fatal编程技术网

将html页面加载到UI web视图iphone SDK 4.0

将html页面加载到UI web视图iphone SDK 4.0,iphone,objective-c,Iphone,Objective C,我想将html页面加载到UI web视图。 我正在使用iphonesdk4.0进行开发 谢谢您可以在iPhone View Controller中对复杂的用户界面使用此方法。因为我们可以轻松创建“.html”页面,并使用此方法显示复杂的UI UIWebView *webView = [[UIWebView alloc] init]; [webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundl

我想将html页面加载到UI web视图。 我正在使用iphonesdk4.0进行开发


谢谢

您可以在iPhone View Controller中对复杂的用户界面使用此方法。因为我们可以轻松创建“.html”页面,并使用此方法显示复杂的UI

UIWebView *webView = [[UIWebView alloc] init];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]isDirectory:NO]]];
[webView setUserInteractionEnabled:YES];
[webView setScalesPageToFit:YES];
[self.view addSubview:webView];
[webView release];