【发布时间】:2018-07-03 06:55:56
【问题描述】:
我现在正在 iOS 上使用 google maps api,但我遇到了这个问题。我有一个带有特定标题的 GMSMarker。
markerTracker = GMSMarker(position: coordinate)
let markerImage = UIImage(named: "markerImage")!.withRenderingMode(.alwaysTemplate)
markerTracker!.title = Constants.alert
/* Do some other GMSMarker setup here */
有一种简单的方法可以让标记本身闪烁:
UIView.animate(withDuration: 1.0, delay: 0.0, options: [.repeat, .autoreverse], animations: {
self.markerTracker?.iconView!.alpha = 0.0
}, completion: nil)
结果将是闪烁的标记图像和标题窗口保持静止。
但是,我想反之亦然,保持标记图像不可变并使标题窗口闪烁。
任何想法如何实现这一目标?看来,当前的 API 只允许访问单个视图,即 iconView。我没有看到获得标题视图的方法。
【问题讨论】:
标签: ios swift google-maps uiviewanimation