I have a custom MKAnnotation that holds a model class Poi.
Which i initialise like so
let annotation = PoiAnnotation()
annotation.poi = poi
...
Then in my calloutAccessoryControlTrapped delegate:
func mapView(mapView: MKMapView, annotationView view: MKAnnotationView, calloutAccessoryControlTapped control: UIControl) {
let annotation = view.annotation as PoiAnnotation
selectedPoi = annotation.poi
At the point i try to access the .poi property of my annotation i get the EXC_BAD_ACCESS exception. Does anybody know why?
This EXC_BAD_ACCESS error and the 'only on simulator' symptom can usually be cleared up with a project clean.
Try 'Product - Clean' Worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With