Swift - 如何更改当前用户位置标记的描述?
Swift - How to change description of current user location marker?
我试过这样的事情:
var description:String = "Custom Text"
map.userLocation.description = description
或
var description:String = "Custom Text"
map.userLocation.description(description)
但是两者都是错误的,我不知道该怎么做。此外,Apple 文档对这种描述方法的帮助不大。
没有description
属性的userLocation
属性。在此上下文中,您看到的 description
方法是从 NSObject
继承的基础方法,在您记录对象时使用。我相信你想要 userLocation
的 title
属性.
我试过这样的事情:
var description:String = "Custom Text"
map.userLocation.description = description
或
var description:String = "Custom Text"
map.userLocation.description(description)
但是两者都是错误的,我不知道该怎么做。此外,Apple 文档对这种描述方法的帮助不大。
没有description
属性的userLocation
属性。在此上下文中,您看到的 description
方法是从 NSObject
继承的基础方法,在您记录对象时使用。我相信你想要 userLocation
的 title
属性.