1.为了使页面调试更真实,启动Xcode模拟ios;
1.模拟ios,终端输入
image.pngxcrun instruments -s
如果出现unable to find utility "instruments", not a developer tool or in PATH
则输入sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/
,然后再输入xcrun instruments -s
结果:
如果模拟iphoneX可以输入xcrun instruments -w "iPhone X (11.2)"
,结果就会在屏幕上显示模拟器: WechatIMG56.png
2.关闭模拟器cmd+w
3.demo详见github
网友评论