NSString cut - Length of NSString in Core Data - Objective-C iOS 3.2
I want to save the filePath of an Ima开发者_StackOverflowgeAttachement in Core Data.
The method addNewImageAttachementWithFilePath creates a new ImageAttachement and registers this at Core Data.
Now I have the problem that the filepath is cut when the filepath of the imageAttachement is set.
- (void) addNewImageAttachmentWithFilePath:(NSString *)filepath
{
ImageAttachment *imageAttachment = [NSEntityDescription insertNewObjectForEntityForName:@"ImageAttachment"
inManagedObjectContext:[self managedObjectContext]];
imageAttachment.filePath = [NSString stringWithString:filepath];
[self addAttachmentsObject:imageAttachment];
}
the filepath is correct. When I set the imageAttachement.filePath to the filepath, the rest of the string is cut.
Thanks for your help.
after some rebuilds and praying the assertation is correct for now. Still a bit confused.
精彩评论