for(NSDictionary* dict in fishs)
{
AVObject * fish = [AVObject objectWithClassName:@"Fish"];
fish[@"name"] = dict[@"name"];
fish[@"fish_code"] = dict[@"code"];
NSString* path = [[NSBundle mainBundle] pathForResource:fish[@"code"] ofType:@"jpg" inDirectory:@"fish images"];
if(path)
{
AVFile* image = [AVFile fileWithData:[NSData dataWithContentsOfFile:path]];
fish[@"image"] = image;
}
[fish saveInBackground];
}
-
创建时间
16年2月26日
-
最后回复
16年2月26日
- 0
回复
- 529
浏览
- 1
用户
- 1
链接