Help with a compiler warning: Initialization from distinct Objective-C type when types match
- by Alex Gosselin
Here is the function where I get the compiler warning, I can't seem to figure out what is causing it. Any help is appreciated.
-(void)displaySelector{
//warning on the following line:
InstanceSelectorViewController *controller = [[InstanceSelectorViewController alloc] initWithCreator:self];
[self.navController pushViewController:controller animated:YES];
[controller release];
}
Interface and implementation for the initWithCreator: method
-(InstanceSelectorViewController*)initWithCreator:(InstanceCreator*)creator;
-(InstanceSelectorViewController*)initWithCreator:(InstanceCreator*)crt{
if (self = [self initWithNibName:@"InstanceSelectorViewController" bundle:nil]) {
creator = crt;
}
return self;
}