Reputation: 51
I have some code that opens Apple Maps when I push a button, but I would somehow like to implement a navigation controller at the top of the screen so that I can go back to the previous page. Is it somehow possible to do this, or do Apple-native apps have their own un-editable ways?
Thanks. All help is appreciated. Here is the code that I use to open the map.
- (IBAction)mapPressed:(id)sender
{
CLLocationCoordinate2D location = CLLocationCoordinate2DMake(25.613336,-80.398437);
//Apple Maps, using the MKMapItem class
MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:location addressDictionary:nil];
MKMapItem *item = [[MKMapItem alloc] initWithPlacemark:placemark];
item.name = @"Zoo Miami";
[item openInMapsWithLaunchOptions:nil];
//I need an navigation bar to open with the Apple map so that I could go back to my app without exiting the map and re-entering my app.
}
Upvotes: 0
Views: 338