简体   繁体   中英

How do get dimensions of elements in Xcode simulator

I'm running my react native application in the xcode simulator. Now I would like to check for the dimensions of the elements and if possible I would like to change things temporarily to see, what I have to change in my code. Something like the developer tools in the chrome browser. Is this possible?

在此处输入图片说明

You can use react-devtools for this (see guide in official documentation ).

When the developer tools are installed and running, you can use the regular Element inspector debug tool from the React Native developer menu ( Cmd + D , Show Inspector ).

Now, instead of limited the in-simulator inspector, you have access to a Chrome Devtools like experience, where you can inspect and edit element styles and props.

Devtools示例

使用Xcode构建应用程序并在模拟器中运行,然后可以使用调试视图层次结构工具

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM