0
在我的Swift應用程序中,我按照本教程向我的mapview添加了自定義的針腳和標註。我的代碼幾乎完全一樣:https://github.com/wircho/CustomMapViewCallout從MapPin中刪除子視圖
每隔幾分鐘,我試圖通過清除當前註釋和標註刷新地圖數據。
我的針類是CustomPin,我的標註類是CustomCallout。
我曾嘗試:
for subview in self.view.subviews {
if (subview is CustomPin) {
print(subview)
subview.removeFromSuperview()
}
}
但這不是我消除了針。如何從我的mapview中刪除我的pin和callout子視圖?
能否請您看看這個問題:http://stackoverflow.com /問題/ 34889659 /連接滑塊到視圖迅速 –