Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Can TabBar apply to some but not all the scenes?
Started by ammar71 Oct 22 2019 08:18 AM

4 replies to this topic
newtabbar composer

Best Answer Rob Miracle , 22 October 2019 - 05:13 PM

Generally speaking, a user using a tabBar type app expects the tabs to always be there. As such most of our examples use the fact that display objects that do not go into a composer scene group stays on top. We call this feature "HUD mode". 

 

If you have a global (or faux global - preferred) reference to the tabBar, you can always hide it:

tabBar.isVisible = false

when you don't want it to show, and then set it back to true when you want it to show,.

 

Rob

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

ammar71

[GLOBAL: userInfoPane.html]
ammar71
  • Enthusiast

  • 60 posts
  • Corona SDK

Hello all,

 

I am thinking of an app where it starts with a "Main Menu".

 

From there "Main Menu":

1- you can go to the "settings menu" (which I would like to make a tabbed view).

2- you can go to "level select" view (not tabbed).

3- Help view (not tabbed).

 

From each for those views we should be able to go back to the "Main menu".

 

When I go back from the "settings menu", the TabBar remains visible.

 

How do I go back to normal (untabbed) view? Or is it not possible to mix "tabbed" and "untabbed" in the same project?

 

Sample project here:

https://1drv.ms/u/s!AsobMPtnfQiBkDto13wPKmv47apd?e=GLVeDQ

 

 

Thanks.



[TOPIC: post.html]
#2

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,861 posts
  • Corona SDK

Of course. You just need to add the tabBar object you created into the scene.view group. 



[TOPIC: post.html]
#3

ammar71

[GLOBAL: userInfoPane.html]
ammar71
  • Enthusiast

  • 60 posts
  • Corona SDK

Thanks @nick_sherman.

 

I tried what you suggested but that removes the tabBar from ALL scenes.

 

I tried to follow the code in the documentation where:

Scene1: the tabBar is defined.

Scene 2: tab one.

Scene 3: tab two.

 

If I add the tabBar to the scene group in scene 1 then as soon as I try to display the first tab (scene 2) the tabBar disappears.

 

The tabBar is not defined in Scenes 2 and 3 so I can't add it to the scene group there.

 

Apology if I misunderstood your solution.



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,300 posts
  • Enterprise

  Best Answer

Generally speaking, a user using a tabBar type app expects the tabs to always be there. As such most of our examples use the fact that display objects that do not go into a composer scene group stays on top. We call this feature "HUD mode". 

 

If you have a global (or faux global - preferred) reference to the tabBar, you can always hide it:

tabBar.isVisible = false

when you don't want it to show, and then set it back to true when you want it to show,.

 

Rob


  • ammar71 likes this

[TOPIC: post.html]
#5

ammar71

[GLOBAL: userInfoPane.html]
ammar71
  • Enthusiast

  • 60 posts
  • Corona SDK

Thanks Rob. It worked.




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: newtabbar, composer