I'm trying to create a mapkit annotation for an OS X application and the default behaviour does not display the Info button. In an iOS app I would use the following:
view.rightCalloutAccessoryView = UIButton.buttonWithType(.DetailDisclosure) as! UIView
In the OS X application, there is no UIButton - I don't think the answer is to load the UIKit framework, but is it? Is there another way? NSButton doesn't have an Info or DetailDisclosure type.
More research: Apple's Mac Developer Library states for MKAnnotationView, the rightCalloutAccessoryView property:
This property is set to nil by default. The right callout view is typically used to link to more detailed information about the annotation. A common view to specify for this property is UIButton object whose type is set to UIButtonTypeDetailDisclosure.
If the view you specify is also a descendant of the UIControl class, you can use the map view’s delegate to receive notifications when your control is tapped. If it does not descend from UIControl, your view is responsible for handling any touch events within its bounds.
It seems that I need UIKit, but it isn't available in a Mac app - unless this is a newbie error I'm making. Your help is appreciated - I've been stumbling over this for a few days and getting nowhere.