如何在 Swift 中转换MKMapItem
为?CLPlacemark
我的代码给了我一个编译器错误'MKMapItem' is not convertible to 'CLPlacemark'
:
var mapItems:[MKMapItem] = []
let mi = self.mapItems[indexPath.row];
ann.placemark = mi as CLPlacemark
在 ObjC 我刚刚做了ann.placemark = (CLPlacemark *)mi;