convertPercentToPosition

API -

return function()
    local app = getApp();
    local position = app.convertPercentToPosition(0.5, 0.5);
    --position.x will be 0 because the center.x of the screen is 0. 
    log(position.x .. ', ' .. position.y); 
end

x=0 is the left side of the screen, x=1 is the right side. y=0 is the bottom of the screen, y=1 is the top.

Last updated