mkpinannotationview

Trying to change MKPointAnnotation colour but losing the title

徘徊边缘 提交于 2021-02-09 08:32:51
问题 I am trying to change my pin colour to purple, when I do it I lose the title though. Code is: - (void)viewDidLoad { [super viewDidLoad]; self.navigationController.navigationBarHidden=YES; //init the location manager self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; [self.locationManager requestWhenInUseAuthorization]; self.mapView.showsUserLocation=YES; self.userGeoPoint=self.message[@"userLocation"]; self.pinView = [

Trying to change MKPointAnnotation colour but losing the title

送分小仙女□ 提交于 2021-02-09 08:32:32
问题 I am trying to change my pin colour to purple, when I do it I lose the title though. Code is: - (void)viewDidLoad { [super viewDidLoad]; self.navigationController.navigationBarHidden=YES; //init the location manager self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; [self.locationManager requestWhenInUseAuthorization]; self.mapView.showsUserLocation=YES; self.userGeoPoint=self.message[@"userLocation"]; self.pinView = [

Custom MKAnnotationView Callout [duplicate]

纵然是瞬间 提交于 2020-02-11 08:24:02
问题 This question already has answers here : Closed 8 years ago . Possible Duplicates: Custom MKPinAnnotation callout bubble similar to default callout bubble How to customize the callout bubble for MKAnnotationView? Does anyone know, or have code that shows, how to create a custom MKAnnotationView Callout? I mean the actual text bubble and not the pin. Thanks in advance. 回答1: you cannot make a custom MKAnnotationView, you can only custom the callout views left and right, it's just a view, so you

Custom MKAnnotationView Callout [duplicate]

情到浓时终转凉″ 提交于 2020-02-11 08:23:40
问题 This question already has answers here : Closed 8 years ago . Possible Duplicates: Custom MKPinAnnotation callout bubble similar to default callout bubble How to customize the callout bubble for MKAnnotationView? Does anyone know, or have code that shows, how to create a custom MKAnnotationView Callout? I mean the actual text bubble and not the pin. Thanks in advance. 回答1: you cannot make a custom MKAnnotationView, you can only custom the callout views left and right, it's just a view, so you

Custom MKAnnotationView Callout [duplicate]

南笙酒味 提交于 2020-02-11 08:23:09
问题 This question already has answers here : Closed 8 years ago . Possible Duplicates: Custom MKPinAnnotation callout bubble similar to default callout bubble How to customize the callout bubble for MKAnnotationView? Does anyone know, or have code that shows, how to create a custom MKAnnotationView Callout? I mean the actual text bubble and not the pin. Thanks in advance. 回答1: you cannot make a custom MKAnnotationView, you can only custom the callout views left and right, it's just a view, so you

MKPinAnnotationView downloaded image (@3x) not working for 6+

不羁岁月 提交于 2020-01-15 06:20:08
问题 I am using map on my application, For pin drop, I want to set user's image instead of default pin. I am downloading users image and setting it as per code I paste below. For different scale of devices I am using image name as per device scale like eg., 1 For non retina device - pin.png (size 30 x 30) 2 For retina devices - pin@2x.png (size 60 x 60) 3 For 6+ device - pin@3x.png (size 90 x 90) Here for 1 and 2 working fine and image loads perfect But for 6+ (3x scale) it's not working What's

How to set the rotation center of an MKAnnotationView

白昼怎懂夜的黑 提交于 2020-01-03 07:33:49
问题 I've got a problem with my MKAnnotationView s when MKUserTrackingModeFollowWithHeading is enabled on the MKMapView. I positioned my images using the centerOffset property of the MKAnnotationView. Specifying the coordinates of the pin's tip relative to the coordinate system at the center of the image is somewhat counter-intutive, but I came up with the following formula: annotationView.centerOffset = CGPointMake(imageWidth/2.0 - tipXCoordinate, imageHeight/2.0 - tipYCordinate); This works fine

How to update information on MKPinAnnotationView?

徘徊边缘 提交于 2020-01-03 00:54:11
问题 I've had some past experience using MKMapView and MKPointAnnotation , which I used to put some pin on a map. This time I am trying to go one step further and use MKPinAnnotationView , to write a label along with some of the pins. Unfortunately, it doesn't all work as I expect. Here is what I want to do: I have a map (an MKMapView object) and when I touch it, I put a pin at the touch point, then some computation is performed and this gives me a second point on the map. I put a second pin on