I have a tab bar controller connected to several navigation controllers. For one of the navigation controllers, I have a view controller with a web view inside. Everything works perfectly; however, say a user clicks a like within the web view and it takes them to a second page...I want that user to be able to click the tab bar button at the bottom and have it send them back to the original web view. Hopefully that makes sense but as an example, look at the App Store app on your iPhone. Say you click on an app within the Featured page. If you click the Featured tab bar button, it takes the user back to the original page. Below is the code I am using. This is Objective-C.
@property (weak, nonatomic) IBOutlet UIWebView *webView;
@end
@impementation FirstViewController
-(void)viewDidLoad {
[super viewDidLoad];
NSURL *url = [NSURL URLWithString:@"www.google.com"]; [self.webView
loadRequest:[NSURLRequest requestWithURL:url]];
}
-(void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
@end