I have a view which consists of 5 buttons. On clicking each button the corresponding url must open up.
I want to design a single webviewcontroller to load the corresponding url on button click... Can anyone suggest how to achieve this???
I have a view which consists of 5 buttons. On clicking each button the corresponding url must open up.
I want to design a single webviewcontroller to load the corresponding url on button click... Can anyone suggest how to achieve this???
Assuming you will modally show the web view upon click of one of the buttons you can pass the URL to the controller which you create before you show it modally.
Something like this
MyWebViewController *controller = [[MyWebViewController alloc] initWithNibName:@"MyWebView" bundle:nil];
controller.URL = <here goes the URL according to the button>
[self presentModalViewController:controller animated:NO];
[controller release];
URL needs to be a synthesized instance variable of MyWebViewController. Inside MyWebViewController you can then use the URL.
Hope it helps.