Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment