I have two viewControllers. In my first viewController I prepare a web address and as soon as I hit a button the second view controller should open the address in a web view. I am not sure how to load the webView automatically with the address. I mean, I am not sure where to call loadRequest in the second view controller. I cannot call in the viewDidLoad as the address will not be sent by then.
WebViewController *webViewController = [[WebViewController alloc] initWithNibName:@"WebViewController" bundle:nil];
webViewController.query = [self getQuery:[query text]];
UINavigationController *navController = [[UINavigationController alloc]
initWithRootViewController:webViewController];
// [navController pushViewController:subView animated:YES];
[[navController navigationBar] setHidden:YES];
[navController setToolbarHidden:YES];
[navController setModalPresentationStyle:UIModalPresentationCurrentContext];
[self presentViewController:navController animated:YES completion:nil];