Reputation: 640
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?
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.
Upvotes: 2
Views: 496
Reputation: 4050
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
Upvotes: 4