nfhipona / AutoCompleteTextField

TextField with smart suggestion for email inputs
http://nfhipona.github.io/AutoCompleteTextField/
MIT License
65 stars 13 forks source link

autoCompleteTextField. emailDomain #14

Closed lfarah closed 8 years ago

lfarah commented 8 years ago

I believe that most people will use AutoCompleteTextField as an autocomplete for emails, so instead of having them copy and paste that huge domainNames array, we could have something like that:

public func autoCompleteTextFieldDataSource(autoCompleteTextField: AutoCompleteTextField) -> [String] {

        return autoCompleteTextField.emailDomain
}
nfhipona commented 8 years ago

ahh good idea! I will make a default supported domains and they could just use the datasource to let their own supported domains kick in. 👌

lfarah commented 8 years ago

Maybe something like this?

let myTextField = AutoCompleteTextField(frame: CGRectMake(0, 0, 100, 30))
myTextField.type = .email
nfhipona commented 8 years ago

ohhh that could also be an option for email or name collections. but I don't think we should support names since it was so huge of a collection. if they want this to get hooked, they can use the datasource to load their own collection.

lfarah commented 8 years ago

Definitely! 👍

nfhipona commented 8 years ago

Added default supported domains.

lfarah commented 8 years ago

Now we have to update the Readme.md

nfhipona commented 8 years ago

Okay thanks for the note.

nfhipona commented 8 years ago

Updated