lua - How can I place a text in tabBar and how can I know in which scene am I in storyboard, Corona SDK -


i using corona sdk , facing problem. in tab bar application, need know in scene in order change text's text number of scene. example, if @ "scene 1" want text's text "1", else if @ "scene 2" want text's text "2".i aslo need place text in tabbar.

i thinking of doing somthing

 local scenename = (my scene's name)   if scenename == "scene 1"      mytext.text = "scene 1"  else if scenename == "scene 2"      mytext.text = "scene 2 

so how can place text in tabbar , how can know scene's name?

also how can name scene , how use in code?

use storyboard.getcurrentscenename() name of current scene. name of scene name of lua file (without .lua extension) contains scene code, i.e. same name use in storyboard.gotoscene("myscenename").

if want have scene name not related lua file think have use storyboard.newscene("scenename") create new scene.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -