When I use the .rotation command on my tabBar, the command is executed visually although there is a problem capturing the button touch events. When the tabBar is rotated 180 deg the touch events appear to have not updated. The issue is complicated further for 90/45 deg commands.
To provide some context, I plan to update composer scenes using the tabBar. On an orientation change I plan to re-position and rotate the tabBar. I am using build version 2511, code below:
– Function to handle button events
local function handleTabBarEvent( event )
print( event.target._id ) --reference to button’s ‘id’ parameter
end
– Configure the tab buttons to appear within the bar
local tabButtons = {
{
label = “Tab1”,
id = “tab1”,
selected = true,
onPress = handleTabBarEvent
},
{
label = “Tab2”,
id = “tab2”,
onPress = handleTabBarEvent
},
{
label = “Tab3”,
id = “tab3”,
onPress = handleTabBarEvent
},
{
label = “Tab4”,
id = “tab4”,
onPress = handleTabBarEvent
}
}
– Create the widget
local tabBar = widget.newTabBar
{
top = display.contentHeight-120,
width = display.contentWidth,
buttons = tabButtons
}
tabBar.rotation = 180