-(void)downloadResult:(id)data
{
if([data isKindOfClass:[NSArray class]])
{
if ([data count]==3)
{
if ([dataResultDictionary count])
{
[[dataResultDictionary objectForKey:[data objectAtIndex:0]] addObject:[NSMutableArray arrayWithObjects:[data objectAtIndex:1],[data lastObject], nil]];
}
else
{
[dataResultDictionary setObject:[NSMutableArray arrayWithObject:[NSMutableArray arrayWithObjects:[data objectAtIndex:1],[data lastObject], nil]] forKey:[data objectAtIndex:0]];
}
if([dataResultDictionary count])
{
if ([[dataResultDictionary objectForKey:[data objectAtIndex:0]] count] == requiredResultCount)
{
[downloadControlQueue cancelAllOperations];
[downloadControlQueue release];
downloadControlQueue = nil;
processing = YES;
[self procesResultData];
}
}
}
else
{
BOOL errorResult = TRUE;
if ([data count])
{
if ([[data lastObject] isKindOfClass:[NSMutableDictionary class]]) {
if ([[data lastObject] count]) {
if ([[[[data lastObject] allValues] objectAtIndex:0] count]) {
[dataResultDictionary setObject:[data lastObject] forKey:[data objectAtIndex:0]];
errorResult = false;
}
}
}
}
if(errorResult)
{
[dataResultDictionary setObject:@"" forKey:[data objectAtIndex:0]];
}
if ([dataResultDictionary count] == requiredResultCount) {
[downloadControlQueue cancelAllOperations];
[downloadControlQueue release];
downloadControlQueue = nil;
processing = YES;
[self procesResultData];
}
}
}
}
我正在从服务器获取数据。我想在图像中显示 % 值的下载结果。但我要崩溃了。最初,这种方法是可行的。我在图像中显示了高达 70% 的数据,但其余部分已崩溃。帮帮我