App's view layout is wrong after upgrade to ios9 on iPad mini 2

We have several games on App Store. They worked before.  But they start to have  wrong layout on iPad mini 2 after iPad  upgrades to iOS9.    The view’s layout  is good  on iPhone5 with iOS9.

We use latest daily build (2725) and xcode7.0.    Config.lua likes below:

local device = system.getInfo(“model”)

print("model is ", device)

if device == “iPad” or device == “iPad Simulator” then
    --iPad
        
       print( display.pixelWidth, display.pixelHeight )
 
        application =
    {
        content =
        {
            width = 768,
            height = 1024,

            scale = “zoomStretch”,
            --antialias = true,
–                        xAlign = “left”,
–                       yAlign = “center”,

            imageSuffix =
            {
                ["@2x"] = 2,
            }
        },
    }
elseif device == “iPhone” or device == “iPod touch” or device == “iPhone Simulator” then
    – iPhone or iPod touch
    if display.pixelHeight > 960 then
        – iPhone 5 or iPod touch 5
        application =
        {
            content =
            {
                width = 640,
                height = 1136,

                scale = “zoomStretch”,
                --antialias = true,
            },
        }
    else
        application =
        {
            content =
            {
                width = 640,
                height = 960,

                scale = “zoomStretch”,
                –    antialias = true,

                imageSuffix =
                {
                    ["@0.5x"] = 0.5,
                }
            },
        }
    end
else
    – Android device
    application =
    {
        content =
        {
            width = 640,
            height = 960,

            scale = “zoomStretch”,
            --antialias = true,

            imageSuffix =
            {
                ["@0.5x"] = 0.5,
                ["@2x"] = 2,
            }
        },
        license =
        {
           
        },
    }
end
 

The orientation is landscapeRight.

After compare with iPhone 5(which works),  when run the app, both in Landscape mode,

for iPad:   display.contentWidth < display.contentHeight.  

for iPhone:  display.contentWidth > display.contentHeight.

How can I fix it?  Who have idea on this issue ?   Thanks a lot.

Can you post screen shots from a device that’s not working and one that is working?

Rob

Thanks Rob, I fix this issue finally, I add code below to make it work, because my app only work in landscape mode:

_G._W = display.contentWidth
_G._H = display.contentHeight

if _G._W<_G._H then
    
    _G._W = display.contentHeight
    _G._H = display.contentWidth

end
  

I want to attach  screen shots, but I don’t know how to do that.

To add screen shots, click on the “More Reply Options” beside the “Post” button. On that screen you can select files and attach them.

Rob

Hi Rob,

My app used to work perfectly, but with ios9, my app does not make use of full screen any more. You can see how on the sides the image is cut. Any idea on how can I fix this?

I am using this in config.lua:

content =

{

    width = 320,

            height = 480,

scale = “zoomstretch”,

graphicsCompatibility = 1,

}

Well scale should be “zoomStretch” if that’s what you want to use. Most people don’t like the stretched look. There are a couple of strategies you can apply.  I don’t have time right now to go into details but all of the basically involve having a background image bigger than your screen regardless of device.  Based on a 320x480 screen, you would want a background that was 360x570. So when you’re on an iPad, it would use the center 360x480 portion of your background. On an iPhone 5, 6, etc. it would use a 320x570 area of the background. Just center your content area over this bigger background and you should be good to go. Then you can use “letterbox” instead of zoomStretch.

Rob

The orientation is landscapeRight.

After compare with iPhone 5(which works),  when run the app, both in Landscape mode,

for iPad:   display.contentWidth < display.contentHeight.  

for iPhone:  display.contentWidth > display.contentHeight.

How can I fix it?  Who have idea on this issue ?   Thanks a lot.

Can you post screen shots from a device that’s not working and one that is working?

Rob

Thanks Rob, I fix this issue finally, I add code below to make it work, because my app only work in landscape mode:

_G._W = display.contentWidth
_G._H = display.contentHeight

if _G._W<_G._H then
    
    _G._W = display.contentHeight
    _G._H = display.contentWidth

end
  

I want to attach  screen shots, but I don’t know how to do that.

To add screen shots, click on the “More Reply Options” beside the “Post” button. On that screen you can select files and attach them.

Rob

Hi Rob,

My app used to work perfectly, but with ios9, my app does not make use of full screen any more. You can see how on the sides the image is cut. Any idea on how can I fix this?

I am using this in config.lua:

content =

{

    width = 320,

            height = 480,

scale = “zoomstretch”,

graphicsCompatibility = 1,

}

Well scale should be “zoomStretch” if that’s what you want to use. Most people don’t like the stretched look. There are a couple of strategies you can apply.  I don’t have time right now to go into details but all of the basically involve having a background image bigger than your screen regardless of device.  Based on a 320x480 screen, you would want a background that was 360x570. So when you’re on an iPad, it would use the center 360x480 portion of your background. On an iPhone 5, 6, etc. it would use a 320x570 area of the background. Just center your content area over this bigger background and you should be good to go. Then you can use “letterbox” instead of zoomStretch.

Rob