I am adding a UILabel dynamically, and I don’t know how to select the frame so that frame exactly fits the text and font size.
UILabel *myLabel = [[UILabel alloc] initWithFrame:myView.frame];
The initWithFrame above is obviously too big for the label.
Is there a way to make it so that the frame is fits exactly with the width and height of the label?
Just use
-sizeToFitmethod to fit the size of font: