开发者

How to open links in UIWebView in iphone

I want to open a link in my application and I don't want to close my application aw well. I have navigation bar on top of application and just 开发者_开发百科below the navigation I want to open my web view. I have defined my outlet.

 IBOutlet  UIWebView *displaySingleData;

How will I open an link in my application.

Thanks in advance


NSString *urlAddress = @”http://www.google.com”;

//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];

//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

//Load the request in the UIWebView.
[webView loadRequest:requestObj];


jst write following code :

[displaySingleData loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]];

Happy coding..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜