xcode iphone simulator view smaller than storyboard

人走茶凉 提交于 2019-12-07 02:10:04

问题


I'm having issues with the size of my story board and the size of the actual display on the iPhone Simulator. Any ideas?


回答1:


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!




回答2:


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:




回答3:


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).




回答4:


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.




回答5:


Uncheck use Autolayout from file inspector

1. go to nib.

2. click on view

3. go to 1st tab

4. Uncheck use Autolayout




回答6:


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.




回答7:


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.



来源:https://stackoverflow.com/questions/13951258/xcode-iphone-simulator-view-smaller-than-storyboard

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