2
I wonder if you can leave Mkmapview in Xcode with circular format. I tried to use mapView.layer.cornerRadius, but I still could not
2
I wonder if you can leave Mkmapview in Xcode with circular format. I tried to use mapView.layer.cornerRadius, but I still could not
3
I did a test here and saw that using cornerRadius works normally.
1. Add the QuarzCore.framework
in the project going in Build Phases > Link Binary with Libraries.
1.1
1.2
2. Import QuartzCore
in your project
Swift:
import QuartzCore;
Objective-C:
#import <QuartzCore/QuartzCore.h>
3. Use the property corerRadius
view layer.
// cornerRadius com metade da altura de uma view quadrada deixa ela redonda
// neste caso uma view de 290x290
mapView.layer.cornerRadius = 145;
Upshot
Thanks is working now, it was more math error even. It had to be a square and the radius half the square.
Browser other questions tagged swift xcode mapkit
You are not signed in. Login or sign up in order to post.
You imported the Quartzcore. h (
#import <QuartzCore/QuartzCore.h>
)? Without it thecornerRadius
will have no effect.– André Ribeiro