LoginSignup
0
0

More than 5 years have passed since last update.

UITableViewCellのnumberOfRowsInSectionとcellForRowAtIndexpath

Last updated at Posted at 2018-05-19
//何行表示させるか
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
}

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0