Hello,
I have 4 newTextFields on a screen for inputting data that works well. The 5 bewTextField I am showing a tableView as a popup to select from. I am using the event for the textfield to try to hide the keyboard first but it does not hide. They keyboard us disabled until I can click back into one of the first 4 textfields. Is there any reason the keyboard is not hiding? Happens on iPhone6 and iPad.
I know the first part of the code is running cause the imgShadow is showing along with list1. You see I am setting the keyboard focus to nil and its not hiding still. This event is for the 5th newtextfield that is to show a popup.
The next code is for the 4th newtextfield where I thought that may help close the keyboard also when done.
Warren
local function onDriver( event ) native.setKeyboardFocus( nil ) HideText() imgShadow.isVisible = true list1.isVisible = true if ( "began" == event.phase ) then native.setKeyboardFocus( nil ) elseif ( "editing" == event.phase ) then native.setKeyboardFocus( nil ) elseif ( "submitted" == event.phase ) then native.setKeyboardFocus( nil ) end end
local function onZip( event )
if ( “began” == event.phase ) then
elseif ( “editing” == event.phase ) then
local txt = event.text
if(string.len(txt)>5)then
txtZip.text = string.sub(txt, 1, 5)
end
elseif ( “submitted” == event.phase or “ended” == event.phase ) then
native.setKeyboardFocus( nil )
end
end