开发者

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....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜