Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

286
Views
How to animate particular table View cell

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.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

can u pls try this

func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
        
        if indexPath.row == 0 || indexPath.row == 1 {
            cell.transform = CGAffineTransform(translationX: self.view.frame.width, y: 0)
            UIView.animate(withDuration: 1) {
                cell.transform = .identity
            }
        }
    }
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!