Ok i guess including a tabBar in the scenes i need is the best choice.
and thanks. I didn’t know that for native objects. But i was wondering how can i change to the next scene after the user submits there info into the textField?
im not sure how to use the setReturnKey() function but im guessing its like this:
function scene:show( event ) local sceneGroup = self.view local phase = event.phase if event.phase == "did" then -- The text field's native peice starts hidden, we show it after we are on screen.on txtField = native.newTextField( display.contentCenterX, display.contentCenterY, display.contentWidth \* 0.8, 40 ) txtField.inputType = "default" txtField.align = "center" local font = "HelveticaNeue" or system.nativeFont txtField.font = native.newFont ( font ) txtField.size = 32 txtField.text = "" txtField.placeholder = "Airport Code" txtField.hasBackground = true txtField:setReturnKey(go) sceneGroup:insert(txtField) txtField:addEventListener ( "userInput", textHandler ) end end
and i also tried to use the textHandler() function to compose a new scene after userinput submit but I still get nothing…
function textHandler( event ) if ( event.phase == "began" ) then print( "Begin editing", event.target.text ) elseif (event.phase == "submitted" ) then print( "Final Text: ", event.target.text ) native.setKeyboardFocus( nil ) composer.removeHidden( ) composer.gotoScene( "dataview" ) end end