Reputation: 1328
I have, for exa, "Facebook" button in SocialWeb.xib
. I want that if user clicks on that button, the webview, defined in another View.xib
, should view Facebook page. What is the code for View.xib
that I must write?
Upvotes: 1
Views: 101
Reputation: 2565
I think you should coordinate this event via your controller, anyway. Can't say exactly what to do without your code. Try this
//Load web view data
NSString *strWebsiteUlr = [NSString stringWithFormat:@"http://your.url"];
//Create a URL object.
NSURL *url = [NSURL URLWithString:strWebsiteUlr];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in the UIWebView.
[webView loadRequest:requestObj];
Upvotes: 2