View does not take up the entire screen on iPad

This is simple. I am working on an iPhone (iOS) game that loads without using .xib files. The window and view are created programmatically. It automatically detects display resolution and retina and adjusts accordingly.

However, when launching and iPad (there is only a simulator for iPad), it displays in a mini-window the same size as the iPhone's resolution, with a small 2x button in the bottom right corner. I want it to load full screen full resolution (higher resolution than phone). Everything will be scaled accordingly so that it looks just like it does on the phone and looks just as crisp.

Why is this happening? Why doesn't the window automatically launch full screen like it does on the iPhone?

After a lot of searching, I found this template: https://github.com/ryanscott/rcloudlib/blob/master/Samples/clean_universal_app_template.zip

which loads correctly for me on both iPhone and iPad.

However, looking at the code, it doesn't change anything other than what I am doing. All it does is check which device is in use and loads the appropriate app delegate, which in this case contains the same code, albeit for the background color. This is clearly aimed at those who want to have a different load on the iPhone and iPad while avoiding the use of knives. I want SAME view on all devices, so I don't need to use multiple delegates, etc.

How do I force the app delegate to use full screen mode regardless of device?

+3


source to share


2 answers


In your Xcode project file, find your target, go to the tab Summary

and make sure the option is Devices

set to Universal underiOS Application Target



Uinversal iOS app settings

+8


source


Yes! In Xcode 6, the Devices option is now called Deployment Target and is located here:



enter image description here

0


source







All Articles