I'm trying to declare a constant that should have a value that is calculated using the frame
property of UIView
. Of course, I cannot access this property when declaring the constant outside of draw()
, and I'm trying to find a workaround.
I've read about lazy variables, but I'm not sure if it is the best option. Also, lazy variables cannot be constants.
Should I just change my constant to a lazy var
or is there another way?