I’m using custom class that subclass from UILabel. It works fine unless I change the string which makes label’s number of line to be changed. I look into the code and when it first initializes, it calls -(void) layoutSubview to determine origin of string and its frame. But when I change the value of string, this method does not get called and therefore some string is not viable due to size of frame and position of string that was calculated from first string. What method needs to be implemented specifically to redraw its frame ?
I’m using custom class that subclass from UILabel. It works fine unless I change
Share
You’re probably looking for
sizeToFit: