isEqualToString 如果不行的话 用下面这个方法 [lab.text rangeOfString:sr].location !=NSNotFound 转载于:https://www.cnblogs.com/lude/p/4549688.html