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

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

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -