开发者

load UIWebView - NSData

开发者 https://www.devze.com 2023-04-08 10:10 出处:网络
How can I load a uiwebview with nsdata like if have NSData *da = [[NSData alloc]initwithContentsofURL:[NSURL URLWithString:@\"google.c开发者_开发技巧om\"]]; //not tested

How can I load a uiwebview with nsdata like if have

 NSData *da = [[NSData alloc]initwithContentsofURL:[NSURL URLWithString:@"google.c开发者_开发技巧om"]]; //not tested

and now use this NSData in UIWebView.

thanks


Check out this method

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

in the UIWebView documentation. That should allow you to load the data in the web view.

0

精彩评论

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

关注公众号