Reputation: 397
Is it possible to have text instead of an image on the callout buttons from the map view?
Something like this?
let leftCalloutButton = UIButton(type: .Custom)
leftCalloutButton.text = "jobs" // this line doesn't compile
pinView!.leftCalloutAccessoryView = leftCalloutButton
I've tried a few implementations of setTitle with no success. Any suggestions?
Upvotes: 0
Views: 226
Reputation: 1235
UIButton have its own method to set title:
leftCalloutButton.setTitle("myTitle", forState: UIControlState.Normal)
Upvotes: 1