多数のセルを含む tableivew があり、uilabel に 3 行以上を表示させようとしています。linebreakmode と numberoflines を適切に設定しましたが、まだ 3 行以上表示されません。助言がありますか?表のセルは、文字数/行数に合わせて高さを自動的に調整しますが、テキストは 3 行で表示され、次に楕円が表示されます (セルをクリックすると、全文を表示する別のビューに移動します。
以下は、UILabel を作成して表示するために必要なコードです。
self.commentLabel = [self newLabelWithPrimaryColor:[UIColor blackColor] selectedColor:[UIColor whiteColor] fontSize:12.0 bold:YES];
self.commentLabel.textAlignment = UITextAlignmentLeft; // default
self.commentLabel.lineBreakMode = UILineBreakModeWordWrap;
self.commentLabel.numberOfLines = 0; // no limit to the number of lines
[myContentView addSubview:self.commentLabel];
[self.commentLabel release];
コメント全体を表のセルに表示したいと思います。