Array<String> does not have a member named 'contains' in swift -


this question has answer here:

can use contains method on array or have instead use filter method , loop through check?

given ignores array<string>

e.g.

    return self.ignores.filter({ (user) -> bool in         user == username     }).count > 0 

or

    return self.ignores.contains(username); 

try this

contains(ignores, username) 

Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

php - Improving script execution time -

How to provide Authorization & Authentication using Asp.net, C#? -