What is similar to coordinate layout (like android) in swift?

Viewed 1136

I just want to give animation in my app like tinder to show profile description page. In android its default functionality in material design by using coordinate layout class. Any one know that how can I give the same animation in my application?

2 Answers

I think we can manage using auto-layout constraints,

  1. create a view that you want to hide and show. Ex: bottomView
  2. Give the height constraint to that bottomView.
  3. Give the vertical constraint in between the bottomView and topView that you wants to move upwards.
  4. When you show the bottomView then the topView will automatically move upwards or if you hide the bottomView then automatically topView will move downwards.

Thats it.

Related