Table View

PHOTO EMBED

Fri Jan 27 2023 17:21:38 GMT+0000 (Coordinated Universal Time)

Saved by @hasnat #ios #swift #table #tableview #snippet

// MARK: - Table View

topPlayersTableView.delgate = self
topPlayersTableView.dataSource = self


extension HomeViewController : UITableViewDelegate, UITableViewDataSource {
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 10
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = topPlayersTableView.dequeueReusableCell(withIdentifier: "TopPlayerTableViewCell") as! TopPlayerTableViewCell
        return cell
    }
}
content_copyCOPY