2012-01-28 53 views

回答

2

您可以使用在iPhone视图控制器复杂的用户界面这种方法开发。因为我们可以轻松创建“.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];