當我嘗試在註釋中添加按鈕時出現問題。將按鈕添加到MKPointAnnotation
之前我問過這個問題,我搜索過以下幾頁答案: How to add a button to the MKPointAnnotation? ,Adding a button to MKPointAnnotation? 等 但這一切不能幫我。
這是什麼嘗試做:
var annotation1 = MKPointAnnotation()
annotation1.setCoordinate(locationKamer1)
annotation1.title = "Title1"
annotation1.subtitle = "Subtitle1"
// here i want to add a button which has a segue to another page.
mapView.addAnnotation(annotation1)
不知道什麼,我試圖做是行不通的。 我正在第一次嘗試swift。
希望有人能幫助我:)
在此先感謝!
的[?我如何添加一個按鈕來MKPointAnnotation](可能的複製http://stackoverflow.com/questions/28225296/how-can-i-add-a-button-to-mkpointannotation) – vikingosegundo