xcode iphone simulator view smaller than storyboard

梦想与她 提交于 2019-12-05 06:26:58

Your simulator is proper. No need to resize it.

You only need to follow these steps

 1. go to nib/storyboard.
 2. click on view
 3. check menu on right side
 4. go to 4th tab
 5. Expand Simulated Metrics
 6. Check Status bar is equal to Default
 7. Top Bar & Bottom Bar are equal to None & None respectively.

Enjoy Programming!

There are many correct answers to this question, but the thing is that you can do that by pressing a single button. I had the same problem and this is how I managed to solve it:

The problem is that your storyboard is using the iPhone 5 screen size. To change your simulator to use the iPhone 5 emulator, goto the simulator and click on Hardware > Device > iPhone (Retina 4 inch).

Your storyboard view is for iPhone 5 but your simulator is iPhone classic. Try changing the simulator to iPhone 5. And if you want to work this view for iPhone classic then try changing the autoresizing for the the two buttons.

Uncheck use Autolayout from file inspector

1. go to nib.

2. click on view

3. go to 1st tab

4. Uncheck use Autolayout

Figured out the answer on how to keep the display at the regular size without having to add and then remove the bars for every screen. I will have to steal part of an earlier answer:

  1. go to nib/storyboard.
  2. click on view
  3. check menu on right side
  4. go to 4th tab
  5. Expand Simulated Metrics
  6. Change the 'size' value to 'Retina 3.5 Full Screen'.

That makes the storyboard layout the same size as the IPhone simulator.

For me, Xcode seemed to fire up the iOS Simulator viewing the iPhone 4 model by default. Maybe there's a better way to set this within Xcode, but in the iOS Simulator app you can go to Hardware > Device and select the screen size you want.

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