mcfly soft
mcfly soft

Reputation: 11655

How to fit the screen to the window in IOS Simulator

I would like to make screenshots of my app in IOS-Simulator. This works fine with CMD-S, but I have always black parts in my screen, because the windows is not autosized to the simulated devices screensize.

Is there a way to autosize the window to fit with the screensize of the simulator ?

Screenshot: The white part is the content of the device. The black is obsolete and is a window from the MAC. When taking the screenshot from this, I still have to cut out the content to have a good screenshot.

enter image description here

Upvotes: 1

Views: 1728

Answers (2)

mcfly soft
mcfly soft

Reputation: 11655

I solved it the following way, but I don't know what was the reason.

  • I removed the launchscreen as hasan83 suggested. This did not the trick yet.
  • I restarted the MAC
  • I started XCode ("Xcode"->"Open Developer Tools"->"IOS Simulator")
  • I started the ios simulator without starting my app. -> MAC-Windows fit with the simulated device screen
  • I started my app and now it looks as intended.

Thanks for helping to all involved people !

Upvotes: 0

hasan
hasan

Reputation: 24185

This used to happen in earlier to iOS SDKS when you don't set a launch images for all devices.

In your case, I think you don't have the launch screen file set. this can be solved by setting that file at general section in the target's settings.

Alternatively, set launch screen images for all devices.

Check my answer here.

One more thing to try: At the top bar in simulator. choose the Window menu then Scale and play with those values.

Upvotes: 1

Related Questions