我知道這聽起來很簡單,但默認情況下,GoogleMaps的默認功能iconView的默認alpha爲0.9。我試圖將其更改爲1,但它仍然是一樣的。任何建議?提前致謝。如何在GoogleMaps中刪除iconView的alpha?
[編輯] 這是我的代碼
let cView = UIView(frame: CGRectMake(0,0,400*PT,300*PT))
let innerView = UIView(frame: CGRectMake(0,0,400*PT,190*PT))
innerView.backgroundColor = UIColor.whiteColor()
innerView.layer.cornerRadius = 3
innerView.layer.masksToBounds = true
innerView.alpha = 1
cView.addSubview(innerView)
let cIcon = UIImageView(frame: CGRectMake(0*PT, 200*PT, 90*PT, 100*PT))
cIcon.image = UIImage(named: "1.png")
cView.addSubview(cIcon)
cView.backgroundColor = UIColor.clearColor()
item.iconView = cView
[編輯]輸出 新增截圖
[編輯]下面的答案後 最終輸出
[不透明度被設定在GMSMarker](https://developers.google.com/maps/documentation/ios-sdk/reference/interface_g_m_s_marker.html#ab3a0c24528927eeba06b01e23070e823),未標記的'iconView',和它默認爲'1'。 'iconView'也不是一個函數。 –
我明白了,但如果您嘗試使用iconView,則可以看到背景幾乎不可見,就像它的alpha爲0.9。所以我試圖將我添加到iconView的customView設置爲alpha = 1,但它不起作用。 –