ios - Rounding UIImage and adding a border -


so want show pictures annotations on map. in order need add image property of mkannotationview. i'm using regular images want them rounded , border. found way round uiimage , found way add border uiimage, border doesn't seem add (i'm not having image on screen, maybe problem?).

i used answer https://stackoverflow.com/a/29047372/4665643 slight modification border. namely:

imageview.layer.borderwidth = 1.5 imageview.layer.bordercolor = uicolor.whitecolor().cgcolor imageview.clipstobounds = true 

but image on map doesn't have border. suggestions ?

imageview.layer.maskstobounds=true imageview.layer.borderwidth=1.5 imageview.layer.bordercolor = uicolor.whitecolor().cgcolor imageview.layer.cornerradius=imageview.bounds.width/2 

try this.


Comments