Drew UI in Xcode . In portrait mode, it is displayed correctly. When I turn the screen, only on the left side (a little more than half) there are UI elements - on the right side there is a white background (that is, the default substrate).

Question: How to make sure that when you rotate the screen in the right part, it is also completely filled?

  • one
    For this, there is an auto layout. You can read for example raywenderlich.com/115440/… - iosp
  • And this link, isn’t it according to swift? I'm just working on objective-c. - Andrew Kachalin
  • one
    There is a link to an earlier version of the documentation, on obj-c: raywenderlich.com/50317/…. That is what you write does not play a role, unless of course the UI is formed programmatically. - iosp

1 answer 1

One possible solution (and probably not the best) would be to deploy the application on a large screen. For example, in the storyboard file go to the view controller tab, from there to the attribute inspector. Next, set up a widescreen apple production (I set 1/2 of the ipad screen width) so that the iphone start up normally in landscape mode. And uncheck the box Resize view from nib . Figure attached: Example