Skip to content

Instantly share code, notes, and snippets.

@ducban
Created July 30, 2010 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ducban/500737 to your computer and use it in GitHub Desktop.
Save ducban/500737 to your computer and use it in GitHub Desktop.
// These options are just collected and didn't test yet.
// Option 01:
#import <QuartzCore/QuartzCore.h>
myMapView.layer.cornerRadius = 10.0;
// Option 02:
float scaleBy = 0.80;
MKMapView *mapView = [[[MKMapView alloc] initWithFrame:CGRectMake(-5, 0, 100/ scaleBy, 50/scaleBy)] autorelease];
mapView.delegate=self;
mapView.layer.cornerRadius = 10.0; // Make the corners rounded
mapView.opaque = NO; // If you are using in a UITableView never set to YES!
mapView.scrollEnabled = NO; // Don't allow user interaction
mapView.zoomEnabled = NO;
mapView.layer.borderColor = [UIColor colorWithWhite:0.0f alpha:0.5f].CGColor;
mapView.layer.borderWidth = 1.0f/ scaleBy;
mapView.layer.transform = CATransform3DMakeScale(scaleBy, scaleBy, 1.0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment