TableView에 표시 할 때 배열의 첫 번째 항목을 무시할 수 있습니까?UITableView 배열의 첫 번째 항목 무시 - Swift
내가 원하는 것은 UITableView에서 제시 될 때 첫 번째 항목을 무시하는 것입니다. 제거하지 않고 그냥 TableView에 표시하지 않으려는 것입니다.
다음 코드는 TableView에있는 배열의 모든 항목을 보여줍니다.
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return lists.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "listCell", for: indexPath)
let data = lists[indexPath.row]
cell.textLabel!.text = data.listName
return cell
}
코드가 충분하지 않습니다. 'numberOfRowsInSection'을 보여줍니다. – matt
게시물이 업데이트되었습니다. 감사. –
마스터 목록과 테이블보기의 데이터 소스에서 실제로 사용하는 데이터 모델이없는 이유는 무엇입니까? – rmaddy