Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source iOS Library That Adds Block Based Callbacks To Map Kit

  •  
  •  
  •  
  •  
  •  

With new maps on the way, I’ve noticed an increase in users searching for Map Kit tutorials and information.  Apple loves to promote apps using their new functionality so if you’ve got an idea that utilizes Map Kit now might be the time to start working on it.

Today I came across a new library that extends Map Kit adding some block based callbacks.

Here’s a few examples from the Github page displaying the added methods demonstrating how easy callbacks are with this library:

[self.mapView setRegion:region animated:YES completion:^{
[[[UIAlertView alloc] initWithTitle:@"Changed Region" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
}];
[self.mapView setCenterCoordinate:coordinate animated:YES completion:^{
[[[UIAlertView alloc] initWithTitle:@"Changed Center Coordinate" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
}];
[self.mapView setVisibleMapRect:MKMapRectWorld edgePadding:UIEdgeInsetsZero animated:YES completion:^{
[[[UIAlertView alloc] initWithTitle:@"Changed Map Rect" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
}];

And as stated on the Github page:

Yes, you can nest them. And, also yes, if you invoke these methods when the user is scrolling, IRMapView is polite enough to animate only after the user has finished scrolling.

You can find the library IRMapView from Evadne Wu on Github here, and a sample project can be found here.

An excellent library for anyone working with Map Kit.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments