在 iOS 模拟器中 React Native 开发菜单冻结 [英] React Native development menu freezing in iOS emulator

查看:54
本文介绍了在 iOS 模拟器中 React Native 开发菜单冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从昨天开始,我开始在 iOS 模拟器中遇到这个问题:

From yesterday I started getting this issue in iOS emulator:

当我在 iOS 模拟器中按 cmd+D 调出开发菜单时,App 无响应约 30 秒.然后当我选择某些内容时(例如在 chrome 中调试).菜单不见了,但应用又 30 秒左右没有响应.

When I hit cmd+D in iOS emulator to bring up development menu, App becomes unresponsive for ~30 sec. Then when I select something (Debug in chrome for example). Menu is gone, but app is unresponsive for another 30 sec or so.

刚创建的应用会发生这种情况:react-native init testapp

This happens with apps that are just created: react-native init testapp

在安卓模拟器中它工作得很好.

In android emulator it works just fine.

视频示例(我试图点击菜单项,然后每隔一秒左右点击计数按钮):https://www.youtube.com/watch?v=O7YIGeQK9lk

Video sample (I am trying to click on menu item and then on count button every second or so): https://www.youtube.com/watch?v=O7YIGeQK9lk

此处代码:https://github.com/juozapas/reactsampleapp

$ react-native --version反应原生cli:0.1.10反应原生:0.19.0

推荐答案

看你的视频,你好像在 iOS Simulator 中开启了Slow animations 调试模式,可能是不小心按下了<代码>Cmd + T.

Looking at your video, it seems that you have enabled the Slow animations debugging mode in the iOS Simulator, perhaps by accidentally pressing Cmd + T.

尝试关闭 Debug > 下的减速动画.慢动画菜单或再次按Cmd + T.

Try turning off the slowed animations under the Debug > Slow Animations menu or by pressing Cmd + T again.

我不确定无响应的根本原因,但这可能是由于在将控件返回给应用程序之前,原生的 Action Sheet 组件在按下按钮时显示动画.

I am not sure of the root cause of the unresponsiveness, but it is perhaps due to the native Action Sheet component animating out on the button press before the control is returned to the application.

这篇关于在 iOS 模拟器中 React Native 开发菜单冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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