views:

669

answers:

1

hi expert, i have CameraViewController and WebViewController with their .h, .m, and .xib,

once app execute, CameraViewController invoked, and its has two button, 1st to snap picture from camera, and 2nd button to view the web, how can implement a code, so when i press the 2nd button called the UIWebView in WebViewController.xib in its -(void) viewDidLoad

-(void)viewDidLoad {
    [mywebView loadRequest:[NSURLRequest requestWithUrl
                          :[NSURL URLWithString:@"www.google.com]]];

when i invoke WebViewController 1st its working fine, but when call from button, WebViewController not called, how can done this,

thanks

+1  A: 

What is the code for the "webview" button? From your CameraViewController your button should have something similar to push to the webviewcontroller:

/**
 * Send to webview controller
 */
self.webViewController = [[WebViewController alloc] initWithNibName:@"WebView" bundle:[NSBundle mainBundle]];


[self.navigationController pushViewController:webViewController animated:YES];
Cory Wiles