Reputation: 41050
I have a HTML Ajax website which consists only of one HTML file. How can I create an iPhone App out of it? The HTML file should be stored locally on the iPhone so it functions offline.
Upvotes: 2
Views: 2583
Reputation: 41050
Finally I found two very good video tutorials which are explaining how to build an "UIWebView for iPhone App"
Upvotes: 0
Reputation: 5079
You will probably want to do at least a tab bar with the webpage in one tab and an "about" or something in the other. Apple has been known to refuse apps that are just a straight up wrapper of a single page.
Upvotes: 1
Reputation: 10296
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];
Upvotes: 6
Reputation: 29725
Depending on what level of AJAX you're using, the "CSS Ninja" has a nice tutorial on how to add the proper code your HTML file to make it accessible offline.
Upvotes: 2