Start a Project

TableView List Animation

Hello guys, Today we learn about TableView List Animation.

Sometimes we need to add some special effects in our table view like, we want to open the list from left to right, top to bottom, and many more effects. To give these effects in our code, for this what do we do? let’s start.

Getting Started:-

Step 1:- Firstly, Create an Xcode project

File—> New—> Project—>iOS—> Next And add your project name then create.

Step 2:- Secondly, create a simple table view and add the code

Step 3:- Now, if you want to show the animation in your table list then we need to call the will display Method

For, a better understanding starts with simple animation

Let’s start with simple animation in table view

you need to add some lines of code the will display the method

Will Display -This method will call when the table view draws the row in the cell.

1. Simple Animation:-

Now, run the app and see the output.

https://mobikul.com/wp-content/uploads/2022/06/Screen-Recording-2022-06-16-at-5.53.25-PM.mov

2. wave Animation:-

Code:-

Output:-

https://mobikul.com/wp-content/uploads/2022/06/Screen-Recording-2022-06-16-at-6.02.49-PM.mov

3. Animation from left to right Or right to left

Code:-

Output:- I am adding the output only for the left to right animation.

https://mobikul.com/wp-content/uploads/2022/06/Screen-Recording-2022-06-16-at-6.13.57-PM.mov

4. Rotation Animation

code:-

Output:-

https://mobikul.com/wp-content/uploads/2022/06/Screen-Recording-2022-06-16-at-6.20.59-PM.mov

5. Linear Animation

code:-

Output:-

https://mobikul.com/wp-content/uploads/2022/06/Screen-Recording-2022-06-16-at-6.55.12-PM.mov

6. Scaling Animation:-

code:-

Output:-

https://mobikul.com/wp-content/uploads/2022/06/Screen-Recording-2022-06-16-at-7.07.32-PM.mov

7. Move Up With Bounce

code:-

https://mobikul.com/wp-content/uploads/2022/06/Screen-Recording-2022-06-16-at-7.16.29-PM.mov

8. Slide-In With Rotation

In this I want to show my table view with two different effects so I have divided my table cell into two-part – even and odd

for odd row i want to slide in effect and for even cell i want to rotary cell

Output:-

https://mobikul.com/wp-content/uploads/2022/06/Screen-Recording-2022-06-16-at-7.21.23-PM.mov

You may also create many more effects like the above example you just need to call the animation function accodingly.

Conclusion:-

In this blog, we discussed the working of TableView List Animation in-app.

I hope this blog will help you to understand the animation functionality

Thanks for reading!!!

Exit mobile version