【发布时间】:2016-06-01 13:03:26
【问题描述】:
我在 MapKit 中有一个自定义标注视图,其中包含一个按钮。我想这样做,以便点击此按钮将执行给定的转场。我怎么能这样做,因为我从一个 .xib 加载自定义标注,它的类是 UIView 的子类(而不是 UIViewController,所以我不能只在其类文件中执行 segue)
编辑
if control == view.detailCalloutAccessoryView as? CustomCalloutView {
if control.viewWithTag(6).touchesBegan {
performSegueWithIdentifier("showRentalDetailsFromCalloutView", sender: self)
}
}
【问题讨论】: