我有一堂课
@interface AppRecord : NSObject
@property (nonatomic, retain) NSString * urlSingle;
@property (nonatomic, retain) NSArray * image_url;
@end
它包含在另一个类中
@class AppRecord;
@interface IconDownloader : NSObject
@property (nonatomic, strong) AppRecord *appRecord;
@end
这是我的根视图控制器
#import "IconDownloader.h"
@implementation RootViewController
- (void)viewDidLoad
{
[super viewDidLoad];
self.imageDownloadsInProgress = [NSMutableDictionary dictionary];
}
- (void)startIconDownload:(AppRecord *)appRecord forIndexPath:(NSIndexPath *)indexPath
{
IconDownloader *iconDownloader = [self.imageDownloadsInProgress objectForKey:indexPath];
if (iconDownloader == nil)
{
iconDownloader = [[IconDownloader alloc] init];
int imgArrCount=[appRecord.image_url count];
NSLog(@"Image array is********************** %@",appRecord.image_url);
for(int i=0;i<imgArrCount;i++)
{
iconDownloader.appRecord.urlSingle=[appRecord.image_url objectAtIndex:i];
NSLog(@"iconDownloader.appRecord.urlSingle---------------------%@",iconDownloader.appRecord.urlSingle);
}
}
}
@end
我可以在这里分配 iconDownloader.appRecord.urlSingle,我的值为空。请帮忙。