开发者

How to use the HTML Template In Xcode?

开发者 https://www.devze.com 2023-02-01 21:00 出处:网络
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 ---

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

精彩评论

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