| 123456789101112 |
- extension ViewController: UITableViewDataSource {
- func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
- 1
- }
-
- func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
- let cell = tableView.dequeueReusableCell(withIdentifier: "SampleCell", for: indexPath) as! SampleCell
- cell.sampleLabel.text = "Index \(indexPath.row)"
- cell.sampleImageView.backgroundColor = .lightGray
- return cell
- }
- }
|