Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Tab Bar Widget Button Overlap
Started by davepmoll Mar 12 2013 07:03 PM

1 reply to this topic
tab bar button ios
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

davepmoll

[GLOBAL: userInfoPane.html]
davepmoll
  • Observer

  • 29 posts
  • Corona SDK

I am building my nav using the widget.newTabBar API.  My app is on iOS Retina.  I sliced my four buttons to equal exactly 640px to fit the width of the screen placed side by side.  In the simulator, the buttons are overlapping.  Can someone tell me how to space the buttons properly?  Thanks!  Here is the code (I haven't built my active state buttons yet):

 

 

local tabButtons = {
    { up="images/nav/navFeaturedActive.png", down="images/nav/navFeaturedActive.png", width = 160, height = 98, onPress=onFirstView, selected=true },
    { up="images/nav/navFavorites.png", down="images/nav/navFavorites.png", width = 160, height = 98, onPress=onSecondView },
    { up="images/nav/navCategories.png", down="images/nav/navCategories.png",  width = 160, height = 98, onPress=onSecondView },
    { up="images/nav/navMyMenu.png", down="images/nav/navMyMenu.png", width = 160, height = 98, onPress=onSecondView },
}
 
-- create the actual tabBar widget
local tabBar = widget.newTabBar{
    top = display.contentHeight - 99,    
    buttons = tabButtons
 

[TOPIC: post.html]
#2

davepmoll

[GLOBAL: userInfoPane.html]
davepmoll
  • Observer

  • 29 posts
  • Corona SDK

I figured it out.  Sorry to be a bother.  I was developing for retina and all my sizes were wrong.  




[topic_controls]
[/topic_controls]