mkmapview

How to dissmiss the add Annotation Animation of a MKAnnotation?

非 Y 不嫁゛ 提交于 2020-01-24 19:31:09
问题 I need to add a big number of annotations on a MKMapview and, the animation which give the impression that the pin falls on the map make that take lot of time to display all of them. Anyone can help me ? Sorry for my english ! Thanks 回答1: You can disable dropping animation with animatesDrop attribute - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>) annotation{ MKAnnotationView *annView =[[[MKAnnotationView alloc] initWithAnnotation:annotation

iOS - MKOverlayView custom view rect fills works, but line draws do not

瘦欲@ 提交于 2020-01-24 12:42:25
问题 New to Map Overlays, but this is a really weird problem. I pass in the mapView.visibleMapRect to my overlay implementation and return that as the boundingMapRect, which is fine for now - just trying to draw a line on the whole map rect. My drawMapRect is getting called, and in the following code - the partially transparent green rectangle is drawn, but the lines are not. I've verified the line drawing code in drawRect of a uiview subclass, so I know it draws something :-) I'm sure I must be

iOS - MKOverlayView custom view rect fills works, but line draws do not

僤鯓⒐⒋嵵緔 提交于 2020-01-24 12:42:18
问题 New to Map Overlays, but this is a really weird problem. I pass in the mapView.visibleMapRect to my overlay implementation and return that as the boundingMapRect, which is fine for now - just trying to draw a line on the whole map rect. My drawMapRect is getting called, and in the following code - the partially transparent green rectangle is drawn, but the lines are not. I've verified the line drawing code in drawRect of a uiview subclass, so I know it draws something :-) I'm sure I must be

iOS - MKOverlayView custom view rect fills works, but line draws do not

泄露秘密 提交于 2020-01-24 12:42:01
问题 New to Map Overlays, but this is a really weird problem. I pass in the mapView.visibleMapRect to my overlay implementation and return that as the boundingMapRect, which is fine for now - just trying to draw a line on the whole map rect. My drawMapRect is getting called, and in the following code - the partially transparent green rectangle is drawn, but the lines are not. I've verified the line drawing code in drawRect of a uiview subclass, so I know it draws something :-) I'm sure I must be

Annotation callout title does not change

跟風遠走 提交于 2020-01-23 19:01:30
问题 I have searched but i didn't found any solution to my problem. I want to change already added pin. And here is my code. I'm getting "Code Here" in console. I have in .h - (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)annotationView; myViewController.m - (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)annotationView { userPins *myAnnot = (userPins *)annotationView.annotation; [myAnnot setTitle:@"o21"]; NSLog(@"Code here!"); } -

ios 7 MKMapView draggable annotation change it's position when map is scrolled

这一生的挚爱 提交于 2020-01-23 07:47:01
问题 I am updating my app (MyWorld) to iOS 7. One of the features of the app is that you can drag pin on the map view. It seems to be broken in iOS7. Steps to recreate the problem: Adding Annotation to the map: - works fine Moving Annotation (Dragging) works fine Scrolling the map: Problem Whenever I scroll the map view annotation is moved with the map. It seems like it's not attached to the right view or layer?? If the pin is not dragged map view seems to work fine and annotation stays in defined

how can I show an image in map pin annotation?

孤人 提交于 2020-01-22 10:33:27
问题 i have one view >> subview mkmapview . in that i want to show image . ...my current image is like this. and i want to show like this how can i do this ? how can i add image in this anotation. 回答1: In your MKAnnotationView set the leftCalloutAccessoryView property leftCalloutAccessoryView The view to display on the left side of the standard callout bubble. @property (retain, nonatomic) UIView *leftCalloutAccessoryView Discussion The default value of this property is nil. The left callout view

how can I show an image in map pin annotation?

家住魔仙堡 提交于 2020-01-22 10:33:05
问题 i have one view >> subview mkmapview . in that i want to show image . ...my current image is like this. and i want to show like this how can i do this ? how can i add image in this anotation. 回答1: In your MKAnnotationView set the leftCalloutAccessoryView property leftCalloutAccessoryView The view to display on the left side of the standard callout bubble. @property (retain, nonatomic) UIView *leftCalloutAccessoryView Discussion The default value of this property is nil. The left callout view

Trying To Call PList data in a for Loop (iOS)

好久不见. 提交于 2020-01-17 07:20:11
问题 I have, what I believe to be a simple question with a simple answer that I cannot figure out for the life of me. I've created a plist that I'm trying to use to populate a MapView annotation with info. I've gone through some tutorials and this is the code I've decided to go with (running a loop). It wasn't showing the pins on the map so I decided to set up NSLogs at different point throughout the code to find the problem and if you look at the code below, it logs out "read1" but not "read2" so

Trying To Call PList data in a for Loop (iOS)

笑着哭i 提交于 2020-01-17 07:20:07
问题 I have, what I believe to be a simple question with a simple answer that I cannot figure out for the life of me. I've created a plist that I'm trying to use to populate a MapView annotation with info. I've gone through some tutorials and this is the code I've decided to go with (running a loop). It wasn't showing the pins on the map so I decided to set up NSLogs at different point throughout the code to find the problem and if you look at the code below, it logs out "read1" but not "read2" so