I am looking for a quicker method to build my application. As i have a series of buttons they all going to open a UIWebView. But each button is going to different website.
May I know is it possible that I just make one xib file? Or should I just create a new file for each of the button?
Here is my code for going to the next xib.
- (IBAction)items:(id)sender {
//toggle the correct view to be visible
Chelseapic *myView1 =[[Chelseapic alloc] initWithNibName:nil bundle:nil];
[myView1 setModalTransitionStyle:UIModalTransitionStylePartialCurl];
[self presentModalViewController:myView1 animated:YES];
}
And this is the code for opening URL in the WebView xib.
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *urlAddress = @"http://www.google.com" ;
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
[self.view addSubview:webView];
}
Many thanks