I have an tableview with array
var scheduledShootsArray = ["a","b","c","e","f","c","e","f"]
my tableview datasources.
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return isScheduledShootSelected ? scheduledShootsArray.count : completedShootsArray.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = segmentTableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! ShootsTableViewCell
if isScheduledShootSelected {
cell.fimName.text = scheduledShootsArray[indexPath.row]
}
return cell
}
its having extra 2 empty cells how to resolve this?