我尝试快速为我的 MKPointAnnotation 创建一个自定义“徽章”,但它失败了,因为 MKPointAnnotation 没有像图像这样的任何属性
var information = MKPointAnnotation()
information.coordinate = location
information.title = "Test Title!"
information.subtitle = "Subtitle"
information.image = UIImage(named: "dot.png") //this is the line whats wrong
Map.addAnnotation(information)
有人想出一个快速的解决方案吗?