Very beginner obj-c question.
Is it a possibility to ask about who is first responder at the moment? I have a tableView with four custom cells and with textfield
in every cell. Link
I tagged textFields
from 1 to 4. And I need to realise the possibility of switching between textfields
with buttons 'Next' and 'Previous' . So ,for example, in code of button 'Next' I need something like this:
if ([[txtfld.tag == 1] isFirstResponder)
{
[[txtfld.tag == 2] becomeFirstResponder];
}
But this code isn't worked because I don't know how to call textField from method where it's not visible. Is it a right way of thinking to resolve this problem, or maybe there is a better approach?
Thanks, Alex