whitesmith / WSTagsField

An iOS text field that represents tags, hashtags, tokens in general.
MIT License
1.28k stars 226 forks source link

Can't Close Keyboard Using Return #28

Closed Gerst20051 closed 7 years ago

Gerst20051 commented 7 years ago

How should we close keyboard when tagsField is focused and return is pressed and only when the textfield is empty?

Gerst20051 commented 7 years ago

I've got this but it would be nice if the textfield wasn't private so that i could check the text contents...

tagsField.onShouldReturn = { tagsField -> Bool in
    tagsField.endEditing()
    return true
}
ricardopereira commented 7 years ago

I will have this in mind for the next release. Thanks!

Gerst20051 commented 7 years ago

@ricardopereira thanks for the prompt responses. let me know if i can help. i might fork this and submit some pull requests and come back to this after i make further progress on some other items.