- (void)viewDidLoad {
TableImageManager *tableImageManager = [[TableImageManager alloc] initDataBase];
allImages = [[[NSMutableArray alloc] init]autorelease];
allImages = [tableImageManager getAllImages];
int i=0;
Image *uneImage = [[Image alloc] init];
NSMutableArray *galeriePhotoSource = [[[NSMutableArray alloc] init] autorelease];
for (i=0; i<[allImages count]; i++) {
uneImage = [allImages objectAtIndex:i];
NSString *imageB64 = [NSString stringWithFormat:@"%@",[uneImage imageB64]];
NSData *dataImageB64 = [NSData dataFromBase64String:imageB64];
UIImage *imagePNG = [UIImage imageWithData:dataImageB64];
NSString *tempURL = [[TTURLCache sharedCache] storeTemporaryImage:imagePNG toDisk:NO];
MockPhoto *unePhoto = [[[MockPhoto alloc] initWithURL:tempURL
smallURL:tempURL
size:CGSizeMake(imagePNG.size.width, imagePNG.size.height)
caption:[uneImage commentaireImage]] autorelease];
[galeriePhotoSource addObject:unePhoto];
}
TTPhotoViewController 明天可以试试
最新推荐文章于 2024-08-23 09:21:43 发布
