removing a tabBar

Hi guys,
I am using storyboard and a tabBar with 2 screens (tabBar.lua, screen1.lua, screen2.lua). , Similar to the TabBar sample come that comes with corona.

  • in tabBar.lua I create a storyboard and the the tabBar which I dont insert in the storyboard group so it remains visible when switching between the tab screens
  • In each of the 2 screens I create storyboard implementation that displays a table with rows.
  • clicking on a row will call storyboard.changeScene(“startGame”).

Problem is that in the startGame scene I do not know how to remove the tabBar. As it is still visible.

My only idea is to use globals… but I am not sure this is the proper way.

Thanks for your help. [import]uid: 74667 topic_id: 30352 reply_id: 330352[/import]

Usually tabBar apps keep the tab bar around and screens above it change.

But if you need it in some scenes and not others you can create the tabBar in the scene where it’s needed and add it to the scene’s view: group:insert(tabBar)

If you only want to create the bar once you could create it in main.lua and have it always be available (as a global) and then in scenes where you don’t want it, just move it off screen:

tabBar.y = display.contentHeight + tabBar.height

or whatever math to move it off screen, then move it back when you need it.
[import]uid: 19626 topic_id: 30352 reply_id: 121678[/import]

Ok I guess I will have to use globals then and create the tab bar in my main as you suggested. Thanks a lot @robmiracle ! :slight_smile: [import]uid: 74667 topic_id: 30352 reply_id: 121842[/import]

Usually tabBar apps keep the tab bar around and screens above it change.

But if you need it in some scenes and not others you can create the tabBar in the scene where it’s needed and add it to the scene’s view: group:insert(tabBar)

If you only want to create the bar once you could create it in main.lua and have it always be available (as a global) and then in scenes where you don’t want it, just move it off screen:

tabBar.y = display.contentHeight + tabBar.height

or whatever math to move it off screen, then move it back when you need it.
[import]uid: 19626 topic_id: 30352 reply_id: 121678[/import]

Ok I guess I will have to use globals then and create the tab bar in my main as you suggested. Thanks a lot @robmiracle ! :slight_smile: [import]uid: 74667 topic_id: 30352 reply_id: 121842[/import]