I've a MKPinAnnotationView
which has a leftCalloutAccessoryView
that receives a UIButton
.
let pinView = MKPinAnnotationView()
pinView.pinTintColor = UIColor.blueColor()
pinView.canShowCallout = true
pinView.draggable = true
let button: UIButton = UIButton(type: UIButtonType.DetailDisclosure)
button.addTarget(self, action: "navigateUserFromCoordinates:", forControlEvents: UIControlEvents.TouchUpInside)
pinView.leftCalloutAccessoryView = button
return pinView
I'm trying to customise the UIButtonType
to display an icon of mine but I couldn't determine how to do so.
Thanks.