ささやかな一歩前進日常のささやかなノウハウの落書き帳ラベル(UILabel)を複数行表示にするiPhone numberOfLinesに0を設定すると、何行でも表示される。 後は、ラベルの高さを調整すればよい。 [cell.textLabel setLineBreakMode:UILineBreakModeWordWrap];//改行モード [cell.textLabel setNumberOfLines:0];
Twitter クライアントのようにテーブルのセルの高さを表示するテキストの内容によって変える方法です。 UITableViewCell に UILabel を入れて、numberOfLines をゼロにします。numberOfLines をゼロにすると行数の制限がなくなります。 次に tableView: heightForRowAtIndexPath: で表示する行によって必要な高さを計算します。NSString を表示するサイズを計算するには、sizeWithFont:constrainedToSize:lineBreakMode: を使用します。 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { NSString* text = @"表示す
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く