i'm trying to convert NSArray to NSDictionary using this code that i found in this post: Convert NSArray to NSDictionary
@implementation NSArray (indexKeyedDictionaryExtension)
- (NSDictionary *)indexKeyedDictionary
{
NSUInteger arrayCount = [self count];
id arrayObjects[arrayCount], objectKeys[arrayCount];
[self getObjects:arrayObjects range:NSMakeRange(0UL, arrayCount)];
for(NSUInteger index = 0UL; index < arrayCount; index++) { objectKeys[index] = [NSNumber numberWithUnsignedInteger:index]; }
return([NSDictionary dictionaryWithObjects:arrayObjects forKeys:objectKeys count:arrayCount]);
}
@end
However there is an error in the line of [self get objects:array objects,...],with message: Sending “NSString _strongto parameter of type _unsafe_unretained id* ”change retain/release properties of pointer. I assume this is because an ARC issue, since the post is in 2009. Anyone know how to get rid the issue?thanks..