iOS simulator only shows app in a quarter of the screen

只愿长相守 提交于 2019-12-01 08:31:31
Henry

I am quite new in iOS. I had the same problem, this is what I did and resolved

1 - xcode 7.1.1.
2 - In the file Inspector, right hand Pane
3 - In "Interface Builder Document", I chose Xcode 5.1; the one I used to do programming before El Capitan and new Xcode installed.

Use this key it may solve your problem

 ⌘+1 for 100%
 ⌘+2 for 75%
 ⌘+3 for 50%

I should first point out for others that this is a simulator/Xcode problem not an app problem, as the simulator also displays the issue when you are in the simulator menus (Apple's menus).

Now the actual workaround, which can take several tries:

1) In the simulator "Menu bar" (the "iOS simulator" top bar, next to the Apple symbol to log off the machine - so not XCode's), select the hardware you want to use (e.g. "hardware > iphone 6"), and cross your fingers.

2) Wait for the Apple home screen to appear in the simulator:

  • If home is NOT full screen, then switch to another hardware (any can do - you could switch between 6 and 6 plus), wait for the menus to appear and then go back to step 1 (or to be clear: you need to switch back and forth between the hardware you want and another random hardware until you have the simulator full screen)

  • If home is full screen then go to step 3, you're fine for now and can do your testing (pressing "test" will use the current full screen simulator)

3) Make sure XCode and the simulator are testing/running the same "iPhone" version (otherwise XCode will invalidate all your efforts by restarting a new simulator). So if you have managed to make an "iPhone 6 plus" simulator full screen, make sure in XCode "iPhone 6 plus" is selected at the top near the "run project" play button so that XCode does NOT restart the simulator for you.

I would say it takes me between 30 seconds to 2-3 minute to get a working simulator this way. If you don't switch sizes often and can leave your simulator opened, it is actually not that bad.

(PS: tried and tested at least 10 times now)

The issue seems to be solved after I installed the Xcode 7 beta 5 (next to the 6.4)

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