Oddbean new post about | logout
 Really fun to watch as someone who played the games! 
 I don’t play the games but I enjoyed the 1st series so will continue 
  //
//  CardsViewController.swift
//  Pokecard
//
//  Created by Alex on 7/15/22.
//

import UIKit

class CardsViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        setUpTableView()
        
        // Do any additional setup after loading the view, typically from a nib.
    }

    @IBOutlet weak var tableView: UITableView!
    
    func setUpTableView() {
        tableView.delegate = self
        tableView.dataSource = self
        
        tableView.register(UINib(nibName: "CardTableViewCell", bundle: nil), forCellReuseIdentifier: "cardCell")
        
        tableView.rowHeight = 120
        tableView.backgroundColor = .white
    }
}

extension CardsViewController : UITableViewDelegate, UITableViewDataSource {
    
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        
        return 120
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        
        let cell = tableView.dequeueReusableCell(withIdentifier: "cardCell", for: indexPath) as! CardTableViewCell
        
        return cell
    }
    
}