Search code examples
iosiphoneswiftipaduinavigationcontroller

Why ViewControllers don't completely fit the screen in an iPad?


When I launch my app in an iPhone, the UIViewControllers fit the screen. But in an iPad, the result is this:

enter image description here

The UIViewControllers don't fit the screen. Why is this happening?


Solution

  • Thats probably because use set iPhone as device in deployment info of general tab in target settings.

    Device settings iPad can open iPhone apps by default but without any modification on it's layout. then you have a button on lower right corner to zoom in.

    If you want your app to support both iPad and iPhone in a native way, you should pick universal. BUT BE CAREFUL! Once you pick universal and upload it tho appstore, there is no way back to change it to single mode (iPhone/iPad only) and you shod continue supporting all platforms. The only way is to delete project entirely and create new one and it means that you may loose all of your users by loosing continues delivery.