ios - How to add an image for each customized annotation on MapView? -
ios - How to add an image for each customized annotation on MapView? - i have class of picture contains latitude , longitude , image of each location. want add together them annotation mapview , show image instead of pin locations. i have customized annotation is: @interface annotation : mkannotationview <mkannotation> @property (nonatomic,assign) cllocationcoordinate2d coordinate; @property (nonatomic,copy) nsstring *title; @property (nonatomic,copy) nsstring *subtitle; @property (nonatomic,retain) uiimage *image; @end and @implementation annotation @synthesize title,subtitle,coordinate,image; @end now in main code trying this: cllocationcoordinate2d location; annotation *myann; for(pictures *pic in picturesfromdb) { myann = [[annotation alloc] init]; location.latitude = [pic.langt doublevalue]; location.longitude = [pic.longt doublevalue]; myann.coordinate = location; myann.title = pic.descript; myann.image = [uiimage imagewithdata:pic.ima...