Saturday, October 15, 2011

Use HTML page on UIWebView in iPhone


   
You can use this method for complex User Interface in iPhone View Controller. Because we can create ".html" page easily and use this method to display complex 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];