Guest User

Untitled

a guest
May 11th, 2012
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. What is the cause of error by using NSPredictate?
  2. #import "Predictate.h"
  3.  
  4. @implementation Predictate
  5.  
  6. @synthesize dictate;
  7.  
  8. -(id)init{
  9. if ((self = [super init])) {
  10. }
  11. return self;
  12. }
  13.  
  14. - (void)Predictate{
  15. dictate = [[NSMutableArray alloc]initWithObjects:@"AAA",@"BBB",@"CCC", nil];
  16. NSPredicate *test = [NSPredicate predicateWithFormat:@"dictate like 'AAA'"];
  17.  
  18. NSMutableArray *result = [dictate filteredArrayUsingPredicate:test];
  19.  
  20. NSLog(@"%@",result);
  21. }
  22.  
  23. -(void)dealloc{
  24. [dictate release];
  25. [super dealloc];
  26. }
  27.  
  28. @end
Advertisement
Add Comment
Please, Sign In to add comment