How do I change the text of a label but keep the formatting as in interface builder?
//This line changes the formatting and makes the text very small
lHolidayNightCount.text = [NSString stringWithFormat:@"%f", sHolidayDuration.value];
How do I change the text of a label but keep the formatting as in interface builder?
//This line changes the formatting and makes the text very small
lHolidayNightCount.text = [NSString stringWithFormat:@"%f", sHolidayDuration.value];
This should not happen, formatting should stay the same. Some elements have various "states" which can be formatted separately, maybe that's the problem?
Another feature is the auto-adjust font-size, which you may want to disable. Whatever you do, it's all solved in IB.
Look at adjustsFontSizeToFitWidth
and minimumFontSize
properties of UILabel