1
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell: UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: "ChatCell")
// put the data
cell.textLabel!.textColor = UIColor.redColor()
cell.textLabel!.textAlignment = .Right
cell.textLabel!.text = array[indexPath.row]
return cell
}
UITableViewCell
とtextAlignment
を作成して使用しています。そうだが、うまくいかない。UITableViewCellテキストアライメントセンター
ところで、赤色がうまく機能します。
私の環境はiOS9
で、swift
です。
ありがとうございます。
1.どのような 'VALUE1' という意味のこの
を試してみてください? 2. No.1を適用した後に字幕を使用できますか? –
これは、デフォルトのテーブルビューセルのスタイルとは異なります。 –
また、.Defaultを試してみてください。 –