So I thought this was simple, but I can’t figure it out. For starters, I’m in landscape mode and I want a button to always be in the bottom right corner of the screen. But to no avail. Even when doing actualContent, and viewableContent, pixelHeight it just doesn’t want to work for me.
Here’s a link to a picture of it on the simulator. Anchor is set to (1,1) so in the bottom corner but it still doesn’t sit in the bottom-most corner (black border). The white box above it is a textbox that itself is supposed to span the entire contentWidth of the device
Any help is much appreciated!
below is when doing iphone6 corona simulator build (750x1334)
[lua]
local testImage7 = display.newImage (“TabBarColor>>FinalBoldGreenGoldAlt.png”)
testImage7.height = display.actualContentHeight/8
testImage7.width = display.actualContentHeight/8 – Using actual content Height for both b/c different screens have different heights and widths
testImage7.anchorX = 1
testImage7.anchorY = 1
–testImage7.x = display.actualContentWidth/2
testImage7.x = display.contentWidth/1
–testImage7.x = display.viewableContentWidth
–testImage7.x = display.pixelHeight/1 — Height b/c default is portrait mode for pixelHeight
testImage7.y = display.contentHeight/1.02
print (display.contentWidth…“contentWidth”)
print (display.contentHeight…“contentHeight”)
print (display.actualContentWidth…“actualContentWidth”)
print (display.actualContentHeight…“actualContentHeight”)
print (display.viewableContentWidth…“viewableContentWidth”)
print (display.viewableContentHeight…“viewableContentHeight”)
print (display.pixelWidth…“pixelWidth”)
print (display.pixelHeight…“pixelHeight”)
[/lua]
terminal:
[lua]
Jun 16 18:46:59.706: 480contentWidth
Jun 16 18:46:59.706: 320contentHeight
Jun 16 18:46:59.706: 569.17333984375actualContentWidth
Jun 16 18:46:59.706: 320actualContentHeight
Jun 16 18:46:59.706: 480viewableContentWidth
Jun 16 18:46:59.706: 320viewableContentHeight
Jun 16 18:46:59.706: 750pixelWidth
Jun 16 18:46:59.706: 1334pixelHeight
[/lua]
