I am have create some custom layer and added on UIView ,i have two CAShaper Layer but i am just showing only one example here
hexBorderOtline = CAShapeLayer()
hexBorderOtline.name = "dhiru_border_hidden"
hexBorderOtline.path = path2.cgPath
hexBorderOtline.lineCap = .round
hexBorderOtline.strokeColor = inActiveBorderColor.cgColor
hexBorderOtline.fillColor = UIColor.clear.cgColor
self.layer.addSublayer(hexBorderOtline)
I want to change it's border color when button is clicked.
func btnAction()
{
hexBorderOtline.strokeColor = activeBorderColor.cgColor
}
But this is not working , i am posting one reference image what i need to do on button click .