You can get a class object for NSPopover using the NSClassFromString () function, this returns a class object that you can use to create instances, for example
id thePopover = [[NSClassFromString(@"NSPopover") alloc] init];
Another possibility is to have two separate nib files, one for 10.6 and one for 10.7, nib does not have to be a complete interface, just the part that contains NSPopover, and then loads the corresponding nib file at runtime.
source share