开发者

how to pass value through NSURL

开发者 https://www.devze.com 2023-02-10 18:14 出处:网络
i was trying to pass value to a native html page from my web view application I try 开发者_运维技巧

i was trying to pass value to a native html page from my web view application

I try

开发者_运维技巧
url=[NSString stringWithFormat:@"%@?bob=123&frank=321&tom=213",url];    

but when i build and debugging program, application crashes showing “EXC_BAD_ACCESS”

Please help me if anyone knows how to do this.


The UIWebView class only supports loading of URLs using the NSURLRequest class. To do what you want to do, you'll need this:


NSURL *url = [NSURL URLWithString:
[NSString stringWithFormat:@"%@?bob=123&frank=321&tom=213",
base]]; NSURLRequest *req = [NSURLRequest requestWithURL:url]; [webView loadRequest:req];
0

精彩评论

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