How to use the HTML Template In Xcode?
can some one tell me how i can u开发者_如何学JAVAse html template on the View Control?
if you want to use existing html page you have then you should use ---
NSString *path = [[NSBundle mainBundle] pathForResource:@"MyWebPage" ofType:@"html"];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[myWebView loadRequest:request];
OR If you want to use your own code for html then you can use
[myWebView loadHTMLString:@"<html><head></head><body style=\"font-family: sans-serif;\"> .... </body></html>" baseURL:nil];
Hope you were helped....
精彩评论