I’ve never loaded a bundle, so I’m not sure why this is not working. I don’t think it matters, but the .xib in question here is in the same Resources folder as all my other .xibs.
NSArray *array = [[NSBundle mainBundle] loadNibNamed:@"S3AsyncView" owner:self];
Returns this error:
Instance method -loadNibNamed:owner not found. Return type defaults to id
I find this error strange, because the return type of [NSBundle mainBundle] is of course NSBundle.
There is no such method in NSBundle, hence the error.
I guess you are looking for:
You can pass
nilto the options, as it expect aNSDictionarySo in your case:
EDIT
If it still doesn’t work, verify you have included
<UIKit/UIKit.h>.EDIT 2
Ok, now I see. You tagged your question with iOS, but now you say it’s a Cocoa app.
The
loadNibNamed:owner:options:is a UIKit addition, so available only on iPhone.On Mac OS X, you’ll use the
+ (BOOL)loadNibNamed:(NSString *)aNibName owner:(id)ownerclass method.So: