Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. -(void)application:(UIApplication *)application didReceiveLocalNotification:(NSDictionary *)userInfo {
  2.  
  3. if (oneAlert != nil){
  4. //bring up apple maps directions
  5. NSDictionary *options = @{MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeWalking};
  6. MKMapItem *currentLocationMapItem = [MKMapItem mapItemForCurrentLocation];
  7. NSLog(@"one alert received");
  8. [MKMapItem openMapsWithItems:@[currentLocationMapItem, oneAlert.closeMatch] launchOptions:options];
  9. NSLog(@"apple maps opened");
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement