Closed SeongKookKIM closed 1 month ago
let record = self.viewModel.records[indexPath.row]
extension CompetitionView: UITableViewDelegate, UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return self.viewModel.records.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "CompetitionTVCell", for: indexPath) as! CompetitionTVCell // 데이터가 유효한지 확인 guard indexPath.row < self.viewModel.records.count else { return UITableViewCell() } let record = self.viewModel.records[indexPath.row] cell.selectionStyle = .none cell.configure(item: record, number: indexPath.row, viewModel: self.viewModel) return cell } }
탭바를 엄청 빠르게 계속 움직일 시 앱이 터지는 문제
원인
해결