cellのdetailTextLabelを表示
2020/09/26確認
Table View CellのStyleをSubtitleに変更します。
detailTextLabelに値をセット
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell: UITableViewCell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
cell.textLabel!.text = articles[indexPath.row]["title"]! as? String
cell.detailTextLabel!.text = articles[indexPath.row]["created_at"]! as? String
return cell
}
実行すると表示します。
Swift – UITableViewの基礎を学ぼう (セルのスタイルの種類について) | WEB ARCH LABO
SwiftのTableViewCellを使ってTableViewを自由にカスタマイズ - Qiita
【Swift】Cell上のUIImageViewにAPIから取得した画像(URL)を表示させたこと - Qiita