ios - 文本字段和动画 Swift 5 的问题
问题描述
所以我有 8 个文本字段和一个加号按钮(可点击的 ImageView)。当我按下加号“按钮”时,下一个文本字段出现并且按钮向下移动。
UIView.animate(withDuration: 0.4, animations: {
self.imageV.center.y += 60
}, completion: nil)
这很好用,但是当我在文本字段中写入时,按钮会移回第一个位置。
解决方案
推荐阅读
- javascript - 全局变量和函数的javascript提升
- python - 为什么 os.path.exists() 会阻止 Windows 命名管道连接?
- cassandra - 从 Apache Cassandra 到 Ignite 的连接器
- redirect - 带有重定向的drupal 7网站垃圾邮件
- c++ - 模板类和好友模板函数
- vba - 我可以使用 VBA 在电子邮件中添加 RangetoHTML(rng) 然后 strbody 吗?
- javascript - for循环和setInterval,幻灯片放映
- c++ - 是否可以使用将模板参数作为模板参数的类型?
- python - python读取文件,打印以特定字符串开头的部分行
- ruby-on-rails - 在 rails 中下载由 XlsxWriter 创建的 XLSX 文件