开发者

NSString cut - Length of NSString in Core Data - Objective-C iOS 3.2

开发者 https://www.devze.com 2023-01-10 09:30 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消