셀에 대해 자막 스타일을 설정했지만 detailTextLabel은 아직 표시되지 않았습니다.detailTextLabel이 셀에 표시되지 않습니다. 3
let cellIdentifier = "homeFeedItem"
let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier) ?? UITableViewCell(style: .subtitle, reuseIdentifier: cellIdentifier)
cell.textLabel?.text = self.arrItems[indexPath.row]["title"]
cell.detailTextLabel?.text = self.arrItems[indexPath.row]["desc"]
cell.imageView?.image = UIImage(named: self.arrItems[indexPath.row]["icon"]!)
나는 self.arrItems [indexPath.row] [ "desc"]를 인쇄 해 보았습니다. 괜찮아. 제발 도와주세요.
인터페이스 작성기에서 스타일을 설정 했습니까? 'dequeueReusableCell (withIdentifier : forIndexPath :) '메소드를 사용하면 항상 유효하지 않은 재사용 셀을 얻을 수 있습니다. 답장을 보내 주셔서 감사합니다. – vadian
프로그래밍 방식으로 설정했습니다. –
프로그래밍 방식으로 설정 한 경우 - 내가 더 복잡한 이유를 이해하지 못하는 경우 - 모든 셀의 스타일이 각각 설정되어 있는지 확인해야합니다. – vadian