xcode 将刷新 iOS 模拟器的 Safari 浏览器的文本编辑器键盘快捷键?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8613172/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Text editor keyboard shortcut that will refresh iOS Simulator's Safari browser?
提问by s2t2
In text editors like TextMate, pressing
在 TextMate 等文本编辑器中,按
COMMAND + R
will save the html document, switch to a browser like Chrome, and refresh the page.
将保存 html 文档,切换到 Chrome 等浏览器,然后刷新页面。
So the question is, how does one use this keyboard shortcut to refresh the Safari browser within the iOS Simulator?
那么问题来了,如何使用这个键盘快捷键来刷新 iOS 模拟器中的 Safari 浏览器?
Is there another editor or program that's more interactive when developing for Safari on iOS?
在 iOS 上为 Safari 开发时,是否还有其他更具交互性的编辑器或程序?
Thanks for your help.
谢谢你的帮助。
采纳答案by Mike K
there is no way to do this by default, but if you're comfortable with working in the shell (e.g. Terminal.app) you could look into something like this command line tool:
默认情况下无法执行此操作,但是如果您对在 shell(例如 Terminal.app)中工作感到满意,则可以查看类似以下命令行工具的内容:
https://github.com/fingertips/ios-sim
https://github.com/fingertips/ios-sim
not sure if you can launch built in apps like safari, tho.
不确定您是否可以启动内置应用程序,例如 safari、tho。
one thing that may be of use is that in desktop safari, if you enable the Develop menu you can set your user agent to be iphone/ipod touch/ipad. i'm not sure how accurate this is, but it might be faster for iterating. (if you don't see the Develop menu in desktop safari, go to preferences, select Advanced and make sure the "Show Develop menu in menu bar" checkbox is checked)
可能有用的一件事是,在桌面 safari 中,如果您启用“开发”菜单,您可以将您的用户代理设置为 iphone/ipod touch/ipad。我不确定这有多准确,但迭代可能会更快。(如果您在桌面 safari 中没有看到“开发”菜单,请转到首选项,选择“高级”并确保选中“在菜单栏中显示开发菜单”复选框)
回答by Jeremy P. Beasley
There's no shortcut within the simulator but if you set up Safari's enable Safari's developer tools (on your desktop) you can use that to debug the simulator. If you have dev tools open, the CMD + R shortcut will refresh the simulator.
模拟器中没有快捷方式,但是如果您设置了 Safari 的启用 Safari 的开发人员工具(在您的桌面上),您可以使用它来调试模拟器。如果您打开了开发工具,CMD + R 快捷方式将刷新模拟器。
Safari > Developer Tools > iPhone Simulator > name of your app
Safari > 开发者工具 > iPhone 模拟器 > 您的应用程序名称
Then CMD + R will make it a lot easier for you!
那么 CMD + R 会让你轻松很多!