I am using this code to launch google map fine.
-(void)buttonPressed:(UIButton *)sender{
NSString *urlstring=[NSString stringWithFormat:@"http://maps.google.com/?saddr=%f,%f&daddr=%f,%f",sourcelocation.latitude,sourcelocation.longitude,destinationlocation.latitude,destinationlocation.longitude];
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:urlstring]];
}
When I click on the button, the google map load. This action is in middle of my application. How can I create the back button?
The better way to do this is not to use
openURLbecause it will exit your application but to use aUIWebViewto view the page and push it onto aUINavigationController:This assumes though that you already have the view you are pushing from in a navigation controller.