views:

743

answers:

3
A: 

Take a look at the last paragraph of the Overview section in the MKMapView class reference:

Although you should not subclass the MKMapView class itself,...

I think that pretty well answers your question of whether you should subclass it. One thing you could do is put another view on top of the MKMapView that looks like the background to round the corners. If you need it to be of arbitrary size, you can try the strechableImage method on UIImage.

Ed Marty
That subclassing note is written in the context of getting the information regarding the maps behavior. I should be able to subclass it to mainpulate the UIView (just like digdog has described)
Kaspa
+6  A: 

The easiest way to make round corner:

#import <QuarzCore.framework/QuarzCore.h>
myMapView.layer.cornerRadius = 10.0;
digdog
Works like charm, thanks!Time to sit down and read more on CA I guess.
Kaspa
:-oIt's amazing what you can learn from the documentation!
Ed Marty
its cornerRadius, not cornerRadious
Sam V
A: 

Just a small correction as the import statement is misspelt in digdog's answer.

Should be

#import <QuartzCore/QuartzCore.h>
myMapView.layer.cornerRadius = 10.0;
Sara