I don’t think it must be done this way. I actually think of a virtual constant while in IDE and when compiled it just sets
a constant with the size globally somewhere so a function is not called or either build it within the framework.
#edit: CGFloat is one example which chooses the size automatically depending on the target which a goods time save for declares. I am so happy with it.