From fee6ac7b30490db502b5571ce5480784c22ffc93 Mon Sep 17 00:00:00 2001 From: life Date: Sun, 8 Nov 2015 15:39:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=9A=E6=96=87=E4=B8=8B=E6=90=9C=E7=B4=A2,?= =?UTF-8?q?=20=E6=90=9C=E7=B4=A2=E7=9A=84=E5=85=A8=E7=AC=94=E8=AE=B0=20#23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 因为不加(, 后面的条件全是or --- Leanote/controller/note/NoteController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Leanote/controller/note/NoteController.m b/Leanote/controller/note/NoteController.m index 5dc29f9..c06da04 100755 --- a/Leanote/controller/note/NoteController.m +++ b/Leanote/controller/note/NoteController.m @@ -884,7 +884,7 @@ { // NSLog(@"[%@ %@]", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - NSString *searchPredicate = [NSString stringWithFormat:@"title contains[cd] '%@' or content contains[cd] '%@'", searchString, searchString]; + NSString *searchPredicate = [NSString stringWithFormat:@"(title contains[cd] '%@' or content contains[cd] '%@')", searchString, searchString]; self.searchedResultsController = [Leas.note fetchedResultsControllerWithPredicate:searchPredicate withController:self