Swift 5/Xcode 11更新后,模拟器在动画块处冻结 [英] Simulator Freezes at Animation Blocks After Swift 5 / Xcode 11 Update

查看:76
本文介绍了Swift 5/Xcode 11更新后,模拟器在动画块处冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Xcode 11中将项目更新为Swift 5,现在该程序在iPhone 11模拟器中的动画块处冻结.当我在动画后设置断点时,它永远不会命中它.重新启动Xcode和模拟器不能解决问题.如果我在设备上运行程序,则可以正常运行.

I updated my project to Swift 5 in Xcode 11 and now the program freezes at my animation blocks in the iPhone 11 simulator. When I set a breakpoint after the animation it never hits it. Restarting Xcode and the Simulator did not solve the issue. If I run the program on a device it works fine.

关于发生了什么的任何想法?也许是内存问题?

Any ideas about what's going on? Maybe a memory issue?

UIView.animate(withDuration: 1, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.5, options: [UIView.AnimationOptions.curveEaseIn], animations: {

    self.introTextView.transform = self.introTextView.transform.translatedBy(x: 200, y: 0)
})

推荐答案

显然,这是模拟器上的错误.希望它将很快得到解决,但是在此之前,您可以通过取消选中粘贴板选项来进行修复.

Apparently it's a bug on the Simulator. Hopefully it will be solved soon, but until then, you can fix by unchecking the pasteboard option.

模拟器->编辑->自动同步粘贴板.

Simulator -> Edit -> Automatically Sync Pasteboard.

从此有用的答案中此处.

这篇关于Swift 5/Xcode 11更新后,模拟器在动画块处冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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