Reputation: 2037
I'm designing a custom cell on my storyboard and it's not resizing my labels according to its text's size. I'm using this code:
- (void)awakeFromNib {
titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
titleLabel.numberOfLines = 0;
[titleLabel sizeToFit];
//[titleLabel setBackgroundColor:[UIColor grayColor]]; -- I put this code here just to be sure that awake from nib is working
}
Should I implement something else?
Regards!
Upvotes: 0
Views: 211