Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-20-2010, 12:00 PM   #1 (permalink)
Registered Member
 
Join Date: Jul 2010
Posts: 6
nsbuckner is on a distinguished road
Default MKAnnotationView issue

Hi,
I have an application that has multiple types of MKAnnotations on a MapView. Each type of annotation has a custom image instead of the standard "pin" that Apple provides.

All of this works great. However, if you tap and drag on an annotation, it changes the image of the annotation to the default red pin that Apple provides. Even if I set the annotations to not draggable, I still get this issue.

I've looked at Apple's sample code for MapCallouts, and their custom annotations don't have that issue. My code is almost the same as that.

Has anyone run into this issue before? Any help would be appreciated, I'm stumped.

The pictures show a before/after shot of what happens when you tap and drag on a pin.
Attached Images
File Type: png Before Drag.png (4.8 KB, 9 views)
File Type: png After drag.png (4.3 KB, 9 views)
nsbuckner is offline   Reply With Quote
Old 10-21-2010, 02:22 PM   #2 (permalink)
Registered Member
 
Join Date: Jul 2010
Posts: 6
nsbuckner is on a distinguished road
Thumbs up Solution

I'm posting the solution to my problem in case anyone else runs into this issue.

The problem was that I was using a MKPinAnnotationView and setting a custom image for it. If you tapped on the pin or tapped and dragged on the pin, it would change to Apple's default pin image.

By using a MKAnnotationView instead and setting the custom image it fixed the problem.
nsbuckner is offline   Reply With Quote
Reply

Bookmarks

Tags
map, mapkit, mapview, mkannotation, mkannotationview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 327
7 members and 320 guests
Desert Diva, dre, hain, mottdog, oceanlablight, schmallegory
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,895
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:10 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0