iPhone应用程序只是一个本地HTML文件,怎么样?

pow*_*tac 2 html iphone safari xcode

我有一个HTML Ajax网站,它只包含一个HTML文件.如何创建iPhone应用程序呢?HTML文件应该本地存储在iPhone上,以便脱机运行.

jam*_*ack 6

UIWebView *htmlView = [[UIWebView alloc] initWithFrame:CGRectMake(0.0,0.0,320.0,380.0)];
[htmlView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]isDirectory:NO]]];
[self.view addSubview:htmlView];
[htmlView release];
Run Code Online (Sandbox Code Playgroud)