I have a table view that has 4 cells. And I want to hide first two cell for few second And i am doing this -:
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if historyArray.count > 0 {
cell.alpha = 0
if indexPath.row == 0 || indexPath.row == 1 {
UIView.animate(
withDuration: 1,
delay: 0.05 * Double(indexPath.row),
animations: {
cell.alpha = 1
})
}
}
but this code has not worked for me. how to do this.