iphone:Three20图书馆的模拟照片和服务器图像

iphone:Three20图书馆的模拟照片和服务器图像,iphone,three20,ttthumbsviewcontroller,Iphone,Three20,Ttthumbsviewcontroller,我正在尝试从服务器下载图像并显示在320库的TTThumbsViewController中。我不能让它工作 当我在本地存储图像时,以下方法适用于我: //Create thumbnails [ImageUtils checkAndSaveThumbnail:imageName andSize:CGSizeMake(100.0, 100.0) andLocation:NO andPrefixof:@"small"]; NSString *fullImageName = [

我正在尝试从服务器下载图像并显示在320库的TTThumbsViewController中。我不能让它工作

当我在本地存储图像时,以下方法适用于我:

    //Create thumbnails
    [ImageUtils checkAndSaveThumbnail:imageName andSize:CGSizeMake(100.0, 100.0) andLocation:NO andPrefixof:@"small"];

    NSString *fullImageName = [NSString stringWithFormat:@"documents://%@",imageName];
    NSString *imageSmallName = [NSString stringWithFormat:@"documents://small-%@",imageName];
    NSString *caption = [tempDict objectForKey:@"Comment"];

    UIImage *tempImage = [UIImage imageWithContentsOfFile:[appDelegate filePath:imageName]];

    MockPhoto *tempPicture = [[MockPhoto alloc] initWithURL:fullImageName smallURL:imageSmallName size:tempImage.size caption:caption photoname:imageName];

    [photoArray addObject:tempPicture];
将photoArray添加到MockPhotoSource中:

self.photoSource = [[MockPhotoSource alloc]
                    initWithType:MockPhotoSourceNormal
                    title:@"Photos"     
                    photos:photoArray
                    photos2:nil
                    ];

[photoArray release];
…但当我给出如下下载位置时,它不起作用!不给我看缩略图和大图

    NSString *url = [delegate downloadImageUrl];

    MockPhoto *tempPicture = [[MockPhoto alloc] initWithURL:url smallURL:url size:tempImage.size caption:caption photoname:imageName];

    [photoArray addObject:tempPicture];
我一直在使用相同的URL与AsyncImage,它下载图像和显示在ImageView罚款

    NSURL *url = [NSURL URLWithString:[delegate downloadImageUrl]];
    UIImageView *profileimage = [[UIImageView alloc] init];
    AsyncImageView* asyncImage = [[[AsyncImageView alloc] initWithFrame:CGRectMake(0, 10, 60, 60)] autorelease];
    asyncImage.imageName = [[users objectAtIndex:indexPath.row] objectForKey:@"Key"];
    [asyncImage loadImageFromURL:url];
    [profileimage addSubview:asyncImage];
你能告诉我MockPhoto怎么了吗


谢谢。

你有照片吗?我在TTCatalog中找不到initWithURL:smallURL:size:caption:photo name:方法。你能检查一下这个方法是否按预期工作吗?该光源是否按预期工作?是的,当我在文档文件夹中本地存储图像时,它工作正常。请参见MockPhotoSource的编辑代码。从昨天起我就一直在挠头。还是没办法!