判断数组里面是否包含某个元素array

 BOOL isbool = [keyArrays containsObject: self.usernameLabel.text];

  if (isbool) {//包含

                

       }else{//不包含

                 

                }

原文地址:https://www.cnblogs.com/liuting-1204/p/6553319.html