Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 如何记录核心数据数据库的内容_Iphone_Core Data - Fatal编程技术网

Iphone 如何记录核心数据数据库的内容

Iphone 如何记录核心数据数据库的内容,iphone,core-data,Iphone,Core Data,在我的应用程序中,我使用coredata存储文档的详细信息 这是我的密码 -(void)writeToDatabase:(UIManagedDocument *)newdocument { Images *image =[NSEntityDescription insertNewObjectForEntityForName:@"Images" inManagedObjectContext:newdocument.managedObjectContext]; im

在我的应用程序中,我使用
coredata
存储文档的详细信息

这是我的密码

-(void)writeToDatabase:(UIManagedDocument *)newdocument
    {
     Images *image =[NSEntityDescription insertNewObjectForEntityForName:@"Images" inManagedObjectContext:newdocument.managedObjectContext];  
      image.album = @"Album 1";
      image.date = @"October";
      image.share = @"Not shared yet"; }
在上述代码中

    1.Images is the core data entity.

    2.I have inserted data in this fashion(temporarily) just to check.
如何记录值?

试试这个

假设coredata中的属性值是字符串

 NSLog(@"Image Name %@",image.album);
 NSLog(@"Data %@",image.date);
 NSLog(@"Share Name %@",image.share);

希望能有帮助。

@Ravi:我会记住的……thanx:)