Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty mask #10

Closed
lucaspedrazoli opened this issue Oct 11, 2018 · 1 comment
Closed

Empty mask #10

lucaspedrazoli opened this issue Oct 11, 2018 · 1 comment
Assignees
Labels

Comments

@lucaspedrazoli
Copy link

It would be great if we could work with empty masks too!
we could do something like:

public func applyFilter(textField: UITextField){
        if _mask == "" {
          return
        }
@moraisandre
Copy link
Owner

Hi Lucas Pedrazoli,

I added the following code and fixed the nil problem:

if _mask == nil || _mask.trimmingCharacters(in: NSCharacterSet.whitespacesAndNewlines) == ""  {
       return
}

Thanks for reporting it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants