My guess is that it's because what this class is doing is illegal. For example, it overrides drawRect:
, which you are not allowed to do for a UILabel. Moreover, it does this without calling super
. So it has interfered with the normal workings of the underlying UILabel, and you are therefore unable to access those normal workings.
Looking at it in a more positive light: an HTMLLabel is not a label. It poses as a UILabel, in the sense that it is all wrapped up and access through a UILabel; but it doesn't use the UILabel to draw the text at all; it uses a helper view called an HTMLLayout. So from the underlying UILabel's point of view, nothing is actually happening. It doesn't consult you about drawing the text because it doesn't draw any text.