首页 > 解决方案 > 文本字段和动画 Swift 5 的问题

问题描述

所以我有 8 个文本字段和一个加号按钮(可点击的 ImageView)。当我按下加号“按钮”时,下一个文本字段出现并且按钮向下移动。

UIView.animate(withDuration: 0.4, animations: { self.imageV.center.y += 60 }, completion: nil)

这很好用,但是当我在文本字段中写入时,按钮会移回第一个位置。

标签: iosswiftanimationbutton

解决方案


推荐阅读