我正在开发OSX应用程序。 我一个子类MKAnnotation: import Foundation
import MapKit
class LocationAnnotation: NSObject, MKAnnotation {
var image: NSImage?
var title: String?
var coordinate: CLLocation
我正在使用MKPointAnnotation个斯威夫特应用程序,我最近碰到了,我需要存储元数据在我上的注释的问题,所以我创建下面的自定义类: class BRETTFAnnotation: MKPointAnnotation {
var tag: Int64
var name: String
init(lat : Double, lon:Double, t :
我希望用户位置为蓝点,同时在地图视图上也有针脚。我希望引脚有一个注释,它有一个信息按钮。 我可以得到用户位置的蓝点,并使引脚具有注释,如标题和副标题。但是,当我将信息按钮添加到红色针脚时,用户位置(蓝点)变成红色针脚。 我似乎无法找到我要出错的地方。它与最后一个函数有关,因为这是将info按钮放到注释中的函数。但它也选择了用户当前的位置,并把它变成一个针因某种原因:( class GetToThe