//何行表示させるか
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 10
}
//行に何を表示させるか
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = UITableViewCell(style: .value1, reuseIdentifier: "Cell")
cell.textLabel?.text = "たろう"
return cell
}
More than 5 years have passed since last update.
UITableViewCellのnumberOfRowsInSectionとcellForRowAtIndexpath
Last updated at Posted at 2018-05-19
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme