iOS app “next” key won't go to the next text field

前端 未结 11 2508
栀梦
栀梦 2020-12-12 21:32

I have a simple scene (using storyboard in IB) with a Username and Password text box. I\'ve set the keyboard to close when you are on the Password text field but can\'t get

11条回答
  •  春和景丽
    2020-12-12 21:40

    You can use this subclass of UITextfield that dynamically change the UIReturnKey according to text/string condition, and then perform your continuation action in the textFieldShouldReturn:(UITextField *)textField delegate

    if (textField.returnKeyType == UIReturnKeyNext)
    
    https://github.com/codeinteractiveapps/OBReturnKeyTextField
    

提交回复
热议问题