Scaling Messed Up

So I’m using this code:

local phoneWidth = display.pixelWidth
local phoneHeight = display.pixelHeight

local background = display.newRect(0, 0, phoneWidth, phoneHeight)

local searchBox = native.newTextBox(0, 0, phoneWidth, 30)
searchBox.isEditable = true

With this config:

application =
{

    content =
    {
        width = 640,
        height = 960,
        scale = “letterBox”,
        fps = 30,
        xAlign = “left”,
        yAlign = “left”
        
        --[[
        imageSuffix =
        {
                ["@2x"] = 2,
        },
        --]]
    },

    --[[
    – Push notifications
    notification =
    {
        iphone =
        {
            types =
            {
                “badge”, “sound”, “alert”, “newsstand”
            }
        }
    },
    --]]    
}
 

And my problem is I can tell that most of the app is off screen:

https://gyazo.com/f45e8b3a3202383d3ad98b3fd54e6311

How could I fix this?

I think you want this:

local phoneWidth = display.actualContentWidth local phoneHeight = display.actualContentHeight

local cx = display.contentCenterX local cy = display.contentCenterY local background = display.newRect( cx, cy, phoneWidth, phoneHeight)

Note: Please use code formatting (blue <> button while editing post)  for subsequent questions w/ code.

I think you want this:

local phoneWidth = display.actualContentWidth local phoneHeight = display.actualContentHeight

local cx = display.contentCenterX local cy = display.contentCenterY local background = display.newRect( cx, cy, phoneWidth, phoneHeight)

Note: Please use code formatting (blue <> button while editing post)  for subsequent questions w/ code.