0
我在創建從我的Map視圖到另一個View Controller的Segue時遇到問題。我希望用戶單擊註釋並彈出另一個視圖控制器。我無法在註釋印刷機和下一個視圖控制器之間創建輪廓。我從地圖視圖中將我的segue命名爲導航視圖Controller'annotationPress'。每當我點擊地圖上的註釋時,我都會看到一個全黑的新視圖控制器。任何意見,將不勝感激。單擊註釋時從地圖視圖中進行縮放
func mapView(mapView: MKMapView!, annotationView view: MKAnnotationView!, calloutAccessoryControlTapped control: UIControl!)
{
// performSegueWithIdentifier("annotationPress", sender: view)
}
override func performSegueWithIdentifier(identifier: String?, sender: AnyObject?) {
println("segueing...")
if identifier == "annotationPress"
{
}
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "annotationPress"
{
println("hello")
var vc = MapRouteViewController()
}
}
,我認爲你不應該創建的MapView一個SEGUE到detailviewcontroller(這是否在所有的工作?),但是從包含的MapView到detailviewcontroller的視圖 - 控制! –