问题
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:
- Press command + shift + 4.
- Press spacebar
- 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:
- Run the Simulator as you normally would.
- 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.
- 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).
- 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.
- 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:
- Press command + shift + 5.
- Hold command + click the simulator.
回答8:
- Press command + shift + 5.
- Choose "Capture selected window"
- Choose "Options" and remove "Show floating thumbnail"
- 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