Size UILabel in UIPickerView to fit <p>I want to make the text size in the <code>pickerView</code> to become smaller if the text does not fit in the label. For example, whenever the text shows like this "This is a test for somebo..." I want it to automatically size itself to a smaller size so it should fit. Here is the code I'm using:</p> <pre><code>- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { UILabel *lView = (UILabel *)view; if (!tView) { tView = [[UILabel alloc] init]; [tView setFont:[UIFont systemFontOfSize:15]]; tView.numberOfLines = [categorie count]; } tView.text = [categorie objectAtIndex:row]; return tView; } </code></pre> <p>I tried to set the number of lines to 0 but that didn't solve my issue. I then tried to make the label <code>sizeToFit</code>, and that didn't work either.</p> <p>I also tried making the label's frame height, taller, so it would be multiple lines, with didn't help either.</p> <p>What did I get wrong?</p>