2
I과 같은 매우 단순한 자 NSPredicate있다 : theString 때이 NSPredicate가 작동하지 않는 이유는 무엇입니까?
가NSPredicate *sPredicate = [NSPredicate predicateWithFormat:@"name beginswith '%@'", theString];
[matchingTags filterUsingPredicate:sPredicate];
이 결과 0을 갖도록 배열을 야기 == "P"그러나
, I이 수행 할 때
NSPredicate *sPredicate = [NSPredicate predicateWithFormat:@"name beginswith 'p'"];
[matchingTags filterUsingPredicate:sPredicate];
을
예상대로 100 개 이상의 결과를 얻습니다.
"theString"을 NSLog()로 체크했는데 그 값이 정확합니다. 나는 중요한 비밀을 놓치고있는 것처럼 느껴진다. 문자가 아닌 문자열을 사용하고있을 가능성이 있습니까?
생각하십니까?
젠장 작동합니다 : 당신의 코드를 변경. 하지만 그렇습니다. 감사! –