Navigate through textfields in UITableView swift
<p>Trying to navigate through text fields in <code>UITableView</code>. Able to navigate through text fields on simple view but not getting how to navigate when text fields are in <code>UITableView</code>.</p>

<p>Below is the code tried so far:</p>

<pre><code>func textFieldDidBeginEditing(textField: UITextField)
{

    //textField.inputAccessoryView = numberToolbar
    if(textField == txtConfirmPassword)
    {
        textField.returnKeyType = UIReturnKeyType.Done
    }
    else
    {
        textField.returnKeyType = UIReturnKeyType.Next
    }
}
</code></pre>

<p>Please guide thanks.</p>

<p>Update:</p>

<pre><code>func textFieldDidBeginEditing(textField: UITextField)
{
    if(delegate != nil)
    {
        delegate?.performSelector(NSSelectorFromString("editingTextField"))
    }

    if(textField.tag == 3)
    {
        textField.returnKeyType = UIReturnKeyType.Done
    }
    else
    {
        textField.returnKeyType = UIReturnKeyType.Next
    }
}

func textFieldShouldReturn(textField: UITextField) -&gt; Bool
{
    if(delegate != nil)
    {
        delegate?.performSelector(NSSelectorFromString("editingDone"))
    }
    if(textField.tag == 3)
    {
        textField.resignFirstResponder()
        delegate?.performSelector(NSSelectorFromString("editingDone"))

    }

     let nextTage=textField.tag+1
    // Try to find next responder
    let nextResponder=textField.superview?.viewWithTag(nextTage) as UIResponder!

    if (nextResponder != nil){
        // Found next responder, so set it.
        nextResponder?.becomeFirstResponder()
    }
    else
    {
        // Not found, so remove keyboard
        textField.resignFirstResponder()
    }
    return true
}
</code></pre>