1.為了使頁面調(diào)試更真實(shí)长踊,啟動(dòng)Xcode模擬ios位喂;
1.模擬ios栖茉,終端輸入
xcrun instruments -s
如果出現(xiàn)unable to find utility "instruments", not a developer tool or in PATH
則輸入sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/
,然后再輸入xcrun instruments -s
結(jié)果:
如果模擬iphoneX可以輸入xcrun instruments -w "iPhone X (11.2)"
,結(jié)果就會在屏幕上顯示模擬器:
2.關(guān)閉模擬器cmd+w
3.demo詳見github