First of all, you must add the required default image for the 4-inch screen. Make sure you have an image in your project with the name Default-568h@2x.png (640 Γ 1136 pixels)
This Default-568h@2x.png is required to support the application on a 4-inch display screen.
You add this image to your working project, delete the old assembly from the device or Simulatore, clear the project and restore the assembly and check. I hope you solve the problem.
Edit: -
After fixing the problem with the black bar, you can check the device as my answer. Let me check this out here: -
Detect device type
you have two options if you cannot use AutoLayout
First
Create two xib with the same class for the 3.5-inch screen and one for the 4-inch screen using a macro to check which screen appears.
Second
Set the Self.view frame using a macro, checking which screen appears.
There are other methods that you can use to set the self.view frame using a window or UIScreen frame.
Nitin Gohel Sep 20 '13 at 9:23 2013-09-20 09:23
source share