view raw
Tom Derry Marion Mantilla Tom Derry Marion Mantilla - 6 months ago 55
Swift Question

How to remove alpha of iconView in GoogleMaps?

I know it sounds easy but by default GoogleMaps default function iconView has a default alpha of 0.9. I tried changing it to 1 but it's still the same. Any suggestion? Thanks in advance.

This is my code

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
let cIcon = UIImageView(frame: CGRectMake(0*PT, 200*PT, 90*PT, 100*PT))
cIcon.image = UIImage(named: "1.png")
cView.backgroundColor = UIColor.clearColor()
item.iconView = cView

Added screenshot of the output

enter image description here

Final output after the answer below

enter image description here


Might be a bit obvious, but can you try adding this?

item.opacity = 1