UIImageView *ceshiimageView = [[UIImageView alloc] initWithFrame:CGRectMake(50, 50, 80, 80)];
ceshiimageView.backgroundColor = [UIColor whiteColor];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
NSString *docDir = [paths objectAtIndex:0];
NSString *filePath = [docDir stringByAppendingPathComponent:@"1f0f0ce3-48e1-4bd3-87ac-28b70dfc7519.data"];
NSData *data = [NSData dataWithContentsOfFile:filePath];
NSLog(@"data%@",data);
ceshiimageView.image = [UIImage imageWithData:data];
[self.view addSubview:ceshiimageView];
ceshiimageView.backgroundColor = [UIColor whiteColor];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
NSString *docDir = [paths objectAtIndex:0];
NSString *filePath = [docDir stringByAppendingPathComponent:@"1f0f0ce3-48e1-4bd3-87ac-28b70dfc7519.data"];
NSData *data = [NSData dataWithContentsOfFile:filePath];
NSLog(@"data%@",data);
ceshiimageView.image = [UIImage imageWithData:data];
[self.view addSubview:ceshiimageView];
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货