“__block” variable results in nil value when go out of block
问题 I wanna use __block variable to get value in block. But when out of block, the __block variable seems to be nil. Why this would happen? NSString *fileName = [Tools MD5Encode:url]; __block NSString *filePath = nil; [fileList enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { NSString *aFileName = obj; if ([aFileName isEqualToString:fileName]) { NSString *path = [VERSIONS_INFO_DATA_DIRECTORY stringByAppendingPathComponent:aFileName]; filePath = path; NSLog(@"filePath1 %@",