我想实现动画绽放按钮和操作,就像在DCPathButton中进行谷歌地图标记点按操作一样。有人可以帮助我吗?
下面给出了样本图像。
这是我要调用动画的地方
func mapView(mapView: GMSMapView, didTapMarker marker: GMSMarker) -> Bool {
return true
}
到目前为止,我已经使用标记位置实现了DCPathButton。现在我想从上面的方法调用按钮动作。代码如下。
func configureDCPathButton(marker: GMSMarker) {
var coordinate = marker.position
var point = viewGMap.projection.pointForCoordinate(coordinate)
var dcPathButton:DCPathButton!
dcPathButton = DCPathButton(centerImage: UIImage(named: "chooser-button-tab"), highlightedImage: UIImage(named: "chooser-button-tab-highlighted"))
dcPathButton.delegate = self
dcPathButton.dcButtonCenter = point //CGPointMake(self.viewGMap.bounds.width/2, self.viewGMap.bounds.height - 25.5)
dcPathButton.allowSounds = true
dcPathButton.allowCenterButtonRotation = true
dcPathButton.bloomRadius = 105
let itemButton_1 = DCPathItemButton(image: UIImage(named: "chooser-moment-icon-music"), highlightedImage: UIImage(named: "chooser-moment-icon-music-highlighted"), backgroundImage: UIImage(named: "chooser-moment-button"), backgroundHighlightedImage: UIImage(named: "chooser-moment-button-highlighted"))
let itemButton_2 = DCPathItemButton(image: UIImage(named: "chooser-moment-icon-place"), highlightedImage: UIImage(named: "chooser-moment-icon-place-highlighted"), backgroundImage: UIImage(named: "chooser-moment-button"), backgroundHighlightedImage: UIImage(named: "chooser-moment-button-highlighted"))
let itemButton_3 = DCPathItemButton(image: UIImage(named: "chooser-moment-icon-camera"), highlightedImage: UIImage(named: "chooser-moment-icon-camera-highlighted"), backgroundImage: UIImage(named: "chooser-moment-button"), backgroundHighlightedImage: UIImage(named: "chooser-moment-button-highlighted"))
let itemButton_4 = DCPathItemButton(image: UIImage(named: "chooser-moment-icon-thought"), highlightedImage: UIImage(named: "chooser-moment-icon-thought-highlighted"), backgroundImage: UIImage(named: "chooser-moment-button"), backgroundHighlightedImage: UIImage(named: "chooser-moment-button-highlighted"))
let itemButton_5 = DCPathItemButton(image: UIImage(named: "chooser-moment-icon-sleep"), highlightedImage: UIImage(named: "chooser-moment-icon-sleep-highlighted"), backgroundImage: UIImage(named: "chooser-moment-button"), backgroundHighlightedImage: UIImage(named: "chooser-moment-button-highlighted"))
dcPathButton.addPathItems([itemButton_1, itemButton_2, itemButton_3, itemButton_4, itemButton_5])
self.viewGMap.addSubview(dcPathButton)
}