How to remove iOS Simulator device label

爷,独闯天下 提交于 2020-04-08 21:37:29

问题


Is it possible to remove the bottom label from the simulator that says "iPhone X - 11.3"? I would like to take a screenshot without the label but include the device bevels and shadow.


回答1:


  1. Press command + shift + 4.
  2. Press spacebar
  3. Hold command + click the simulator



回答2:


For some reason, I can't get the FloatingNameMode setting to work anymore on Xcode 9.4

A solution I found by accident is the following:

  1. Run the Simulator as you normally would.
  2. Click somewhere on you desktop, in such way the Simulator is still visible (i.e. not blocked behind other windows) but no longer the active application.
  3. Now the Simulator is no longer the active application, the device label is now also gone (and the Simulator frame went from black to dark grey).
  4. Press command + shift + 4 ( add control if you want to save the screenshot to memory only) then press space and hover over the 'inactive' Simulator.
  5. Press the keypad to take the screenshot. The screenshot is now saved without the device label.



回答3:


defaults write com.apple.iphonesimulator FloatingNameMode 2

That option is not guaranteed to work forever, but it works with current builds.




回答4:


In case you want to have iPhone's borders there is a hacky way to make a screenshot without the iPhone label.

Move the iPhone the way so that the label is not visible on the screen. As below:

After making a screenshot using: Shift+Cmd+4 > hover the simulator > press Space > press click on touch pad. It will take a screenshot of this area:

And then as a result you will have an image of simulator without the label:

Hope this answer was clear :)




回答5:


On 11.4, I had to use "3":

defaults write com.apple.iphonesimulator FloatingNameMode 3



回答6:


can use Terminal as well:

screencapture -l$(osascript -e 'tell app "Simulator" to id of window 1') screenshot.png



回答7:


  1. Press command + shift + 5.
  2. Hold command + click the simulator.



回答8:


  1. Press command + shift + 5.
  2. Choose "Capture selected window"
  3. Choose "Options" and remove "Show floating thumbnail"
  4. Left-click on the simulator to take the screenshot

BONUS The floating thumbnails won't appear any longer on your screenshot when using command + shift + 4 spacebar either



来源:https://stackoverflow.com/questions/50497045/how-to-remove-ios-simulator-device-label

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!