I m experiencing the oddest behavior with a CoreData managed object. In my viewDidLoad method I do the following:
NSPredicate *predicate =[NSPredicate predicateWithFormat:@"uuid = %@", self.imageUUID];
NSFetchRequest *imageFetchRequest = [[[NSFetchRequest alloc] init] autorelease];
[imageFetchRequest setPredicate:predicate];
NSEntityDescription *imageEntity = [NSEntityDescription entityForName:@"Image" inManagedObjectContext:appDelegate.managedObjectContext];
[imageFetchRequest setEntity:imageEntity];
error = nil;
NSArray *array = [[appDelegate managedObjectContext] executeFetchRequest:imageFetchRequest error:&error];
tagImage = (Image *)[array objectAtIndex:0];
assert([tagImage isKindOfClass:[Image class]]);
申辩通过。 这一特殊观点是一张表式录音机和我的“ForRowAtIndexPath”方法,我需要检查一些图像特性。 在我获得门槛财产时,申请未能提出另一种说法:
assert([tagImage isKindOfClass:[Image class]]);
当时,这一说法失败了。 我不知道什么是使门槛物体改变类型。