Hi,
I have a scene where I add a native text field to be used. In the docs it says I need to use the object.removeSelf(). Where do I do this to remove the text field when I leave the scene? Because if I do a storyboard.gotoScene the text field stays there on the screen. If the text field is called field1 do I say field1.selfRemove()? And if so where in the storyboard do I do this? I tried different places and the app stops running or doesn’t go to the new scene. I thought it would go in scene:exitScene or scene:destroyScene functions but doesn’t work there.
Here is how I add it to the current scene:
local field1 = native.newTextField( 20, 550, 260, 35 )
field1.size = 14
field1.font = native.newFont( "Helvetica-Bold", 14 )
field1.text = ""
field1:setTextColor( 51, 102, 149 )
Thanks!!
[import]uid: 184193 topic_id: 34729 reply_id: 334729[/import]