
Untitled
By: a guest on
May 11th, 2012 | syntax:
None | size: 0.54 KB | hits: 17 | expires: Never
What is the cause of error by using NSPredictate?
#import "Predictate.h"
@implementation Predictate
@synthesize dictate;
-(id)init{
if ((self = [super init])) {
}
return self;
}
- (void)Predictate{
dictate = [[NSMutableArray alloc]initWithObjects:@"AAA",@"BBB",@"CCC", nil];
NSPredicate *test = [NSPredicate predicateWithFormat:@"dictate like 'AAA'"];
NSMutableArray *result = [dictate filteredArrayUsingPredicate:test];
NSLog(@"%@",result);
}
-(void)dealloc{
[dictate release];
[super dealloc];
}
@end