I have n't seen this answer given anywhere. My technique is to set a width constraint on the label and adjust that width when setting the label text.
self.myLabel.text = myString;
UIFont * const font = [UIFont systemFontOfSize:17 weight:UIFontWeightRegular]; // Change to your own label font.
CGSize const size = CGSizeMake(INFINITY, 18); // 18 is height of label.
CGFloat const textWidth = [myString boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName: font} context:nil].size.width;
self.myLabelWidthConstraint.constant = textWidth + 20; // 10 padding on each side. Also, set text alignment to centre.