I have two pices of code:
for(Class<ContactV2Storage> tmpClass in config->ctxStorageClasses){
id<ContactV2Storage> stor = [[[tmpClass alloc] init] autorelease];
}
and
for(Class tmpClass in config->ctxStorageClasses){
id<ContactV2Storage> stor = [[[tmpClass alloc] init] autorelease];
}
Both works this same, but while using first version (which I believe is better) compiler gives me a warning:
Class method '+alloc' not found (return type defaults to 'id')
I'm curious why this is happening?