2

Is there a way to get the left accessory view of the callout to just fill in the rest of the view with a background color? Current callout

I am currently just doing it with this

let leftView = UIImageView(image: UIImage(named: "leaf32"))
leftView.backgroundColor = UIColor.redColor()
anView.leftCalloutAccessoryView = leftView

I want to have the background fill like the blue in the apple maps default callout. Apples map callout

tnek316
  • 630
  • 1
  • 5
  • 16

1 Answers1

4

Do this:

let leftView = UIImageView(image: UIImage(named: "leaf32"))
leftView.frame = CGRect(x: 0, y: 0, width: 50, height: 50)
leftView.backgroundColor = UIColor.redColor()
anView.leftCalloutAccessoryView = leftView
Ahmed Onawale
  • 3,992
  • 1
  • 17
  • 21