Simulator Freezes at Animation Blocks After Swift 5 / Xcode 11 Update

强颜欢笑 提交于 2019-12-11 06:07:19

问题


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)
})

回答1:


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.

From this helpful answer here.




回答2:


After restarting my computer everything now seems to be working fine. If that changes I will report back in case anyone else runs into the same issue.

UPDATE: Unfortunately it's a temporary fix. After a while, the simulator freeze issue starts again and I need to restart to get it working properly.

Additional UPDATE: After updating to the newest version of Xcode the issue went away.



来源:https://stackoverflow.com/questions/58194400/simulator-freezes-at-animation-blocks-after-swift-5-xcode-11-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!