iOS 14坏动画 [英] iOS 14 broken animations

查看:100
本文介绍了iOS 14坏动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始使用SwiftUI为iOS 13创建一个应用程序(尚不在应用程序商店中).在过去的几周中,我一直在重写应用程序的各个部分,以使其可在iOS 14上使用(是的,那些该死的列表分隔符-它们何时可移动???).该应用现在可以运行,但是许多动画都坏了-这意味着:我创建的弹出视图代替了春季动画,而现在根本没有动画.该动画在真实设备和模拟器(iPhone SE 2n gen)上的iOS 13.6和13.7上均运行良好,但在iOS 14下则不再有效.我刚刚下载了Xcode 12.2 beta(iOS 14.2),但问题尚未解决.我在反馈应用程序中发布了该问题.我只想问问其他人是否对动画有类似的问题.如果我收到Apple的回复(不太可能...),我将更新这篇文章. 无论我是否在iOS 14模拟器或设备上运行该应用程序,代码都完全相同.

I started creating an app (not in app store yet) for iOS 13 with SwiftUI. These past few weeks I've been rewriting parts of the app to make it workable for iOS 14 (yes, those damn List separators - when will they be removable???). The app now works, but many of the animations are broken - which means: e.g. instead of a spring animation, a pop-out view I created now appears without animation at all. the animation worked well under iOS 13.6 and 13.7 both on a real device and in the simulator (iPhone SE 2n gen) but not any more under iOS 14. I just downloaded Xcode 12.2 beta (iOS 14.2) but the problem has not been solved. I posted the issue in the feedback app. I would just like to ask if anyone else has a similar issue with animations. I will update this post in case I get a reply from Apple (unlikely...). The code is exactly the same of course, no matter if I run the app an an iOS 14 simulator or device.

推荐答案

更新xCode后,动画也出现了问题.

I had also a problem with animations after updating xCode.

在我的情况下是UICollectionViewCell的问题:

In my case was the problem with UICollectionViewCell:

    // iOS 13
    cell?.contentView.animateScaleTransform(x: 0.9, y: 0.9, duration: 0.1)

在使用新版本的xCode构建后,我陷入了混乱……

After building with the new version of xCode I got a crazy mess ...

我一直在寻找很多信息,但是它很容易修复:

I was looking for a lot of information but it was fixed too easy:

    // iOS 14
    cell?.animateScaleTransform(x: 0.9, y: 0.9, duration: 0.1)

因此,我对您的建议是检查要设置动画的视图. 也许Apple更改了默认视图层次结构中的某些内容. 另外,显示一些代码会更好.

So, my recommendation for you will be to check the views that you are animating. Maybe Apple changed something in the hierarchy of default views. Also, it will be better if you show some code.

这篇关于iOS 14坏动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆