开发者

UIWebView: How is baseURL for loadHTMLString or loadData methods supposed to work?

Due to some major issues with caching in the UIWebView, I'm requesting an HTML page myself and loading it into the web view using the following method:

-(void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType
        textEncodingName:(NSString *)encodingName baseURL:(NSURL *)baseURL

Previously, I've been setting thebaseURL to nil since all resources were defined with absolute URLs. I found 1 relative link, and rather than try to guarantee that all resources in the future have absolute paths, I thought it would be better to specify base URL. When I try doing that, the web view loads the base URL instead of the 开发者_开发百科NSData.

There isn't much in Apple's documentation for base URL. What's the expected behavior here?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜