OGeek|极客世界-中国程序员成长平台

标题: ios - swift中的坐标布局(如android)有什么相似之处? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 19:48
标题: ios - swift中的坐标布局(如android)有什么相似之处?

我只想在我的应用程序中添加动画,例如 tinder 以显示个人资料描述页面。在android中,它在 Material 设计中的默认功能是使用坐标布局类。任何人都知道如何在我的应用程序中提供相同的动画?



Best Answer-推荐答案


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

iOS 中没有这样的布局类型

iOS 布局更简单,给你更多控制,你需要做的是使用一些 UIView 并通过约束来操作它们,因为约束布局与动画完美配合

或者如果你想制作一个单独的东西,你可以添加 UIContainer,然后添加你的 UIViewController 的

有一个用于动画自动布局约束的简单教程: https://useyourloaf.com/blog/animating-autolayout-constraints/

关于ios - swift中的坐标布局(如android)有什么相似之处?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44361427/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4