UIWebView and local css file

后端 未结 4 530
盖世英雄少女心
盖世英雄少女心 2020-12-13 03:10

I want to style a web page meant for the desktop so that it is presentable on a UIWebView on iPhone. I do not have access to the web server from which the pages originate. I

4条回答
  •  误落风尘
    2020-12-13 04:03

    You can load CSS from local project directory

    NSString *path = [[NSBundle mainBundle] bundlePath];
    NSURL *baseURL = [NSURL fileURLWithPath:path];
    [webView loadHTMLString:htmlString baseURL:baseURL];
    

    detail info check this site : http://iphoneincubator.com/blog/windows-views/uiwebview-revisited

提交回复
热议问题