Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: FizzPow on March 17, 2013, 01:02:31 AM

Title: UIInput iOS Keyboard & Auto Camera Movement
Post by: FizzPow on March 17, 2013, 01:02:31 AM
Hello.  I have a simple 3 field signup form on my iOS app.  I'd like to detect when the user is entering data into a specific field and then adjust the camera (or something) so that the each field is still visible to the user when the iOS keyboard pops up, like most iOS apps seem to do.  What's the best way to accomplish this?  Secondly, but not as important, is there any way to show the "next" button on the iOS keyboard and have it move to the next field.  Thanks!
Title: Re: UIInput iOS Keyboard & Auto Camera Movement
Post by: ArenMook on March 17, 2013, 09:13:55 AM
UICamera.selectedObject will point to the game object containing the input field you're working with. In OnSubmit callback on your input, simply UIInput.selected = true on the next field.
Title: Re: UIInput iOS Keyboard & Auto Camera Movement
Post by: FizzPow on March 18, 2013, 11:24:15 AM
Ah great, thank you!
Title: Re: UIInput iOS Keyboard & Auto Camera Movement
Post by: FizzPow on March 19, 2013, 11:28:25 PM
So I ran into an issue.  Here's my Event Receiver on my email field:

  1.     void OnSubmitEmail(string text)
  2.     {
  3.         Debug.Log("OnSubmitEmail: " + text);
  4.         inputPW1.selected = true;
  5.     }
  6.  

inputPW1 highlights for a split second and leaves a carat there but it jumps immediately back to my email field?