UILabel if text in label is too short to fit in the number of lines used for that label, the text is displayed in the vertical center of the label.
To vertically align the text at the top of the UILabel
_titleLabel.text = [self._myArray objectAtIndex:indexPath.row]; // get text array.
[_titleLabel setNumberOfLines:0];
//
[_titleLabel sizeToFit];
No comments:
Post a Comment