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

I just want to give animation in my application like tinder to show the profile description page. In android its default functionality in material design is used using the coordinate layout class. Does anyone know how I can give the same animation in my application?

+3


source to share


2 answers


The main attraction of CoordinatorLayout is its ability to coordinate animations and transitions of views within it through coordinates

There is no layout type in iOS

IOS schema is much simpler and gives you more control, what you need to do is work with some UIViews and manipulate them through constraints, as constraint layouts work great with animation



or if you want to do separate things you can just add a UIContainer and then add your UIViewController to it

there is a simple tutorial on animating autodetect constraints: https://useyourloaf.com/blog/animating-autolayout-constraints/

0


source


I think we can control the use of auto-layout constraints,

  • create the view you want to hide and show. Example: bottomView
  • Give a height constraint to this bottom view.
  • Give a vertical constraint between bottomView and topView that you want to move up.
  • When you show the bottomView, the topView will automatically move to the top, or if you hide the bottom View, then the topView will automatically move to the bottom.


Here it is.

0


source







All Articles