i new swift , trying set black border around uiimageview unable so. code
@iboutlet weak var flagimage: uiimageview! var image = uiimage(named: "estonia") override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. flagimage.layer.bordercolor = uicolor(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0).cgcolor flagimage.layer.cornerradius = 5.0 flagimage.contentmode = .scaleaspectfit flagimage.image = image } could on this?
you gave border color imageview how expect see color out area fill in. so,
flagimage.layer.borderwidth = 2 // wish gives area around imageview of thickness 2 fill in color gave.
Comments
Post a Comment