can someone help me please, I'm trying to customize a UIButton I made a "setup" function but I would like a parameter to allow me to modify the borderColor. I don't know how to initialize the borderColor property here is the code:
`
import UIKit
class MyBouton: UIButton {
let borderColor: UIColor // property that I would like to initialize
override init(frame: CGRect) {
super.init(frame: frame)
setup(borderColor: <#UIColor#>)
}
required init?(coder: NSCoder) {
super.init(coder: coder)
setup(borderColor: <#UIColor#>)
}
func setup(borderColor: UIColor) { // function in which I want to use the property
layer.cornerRadius = 10
layer.borderWidth = 2
layer.borderColor = borderColor.cgColor
}
}
`