Hello,
I'm trying to get my head around Objective-C for the iPhone. My app is compiling and running just fine so far, but I'm getting a compiler warning that I cannot get rid of.
Header for one class: (snipped)
@interface PersonDetailViewController : UIViewController {
NSDictionary *person;
}
@property (retain) NSDictionary *person;
@end
Implementation for this class: (also snipped)
#import "PersonDetailViewController.h"
@implementation PersonDetailViewController
@synthesize person;
@end
I'm creating an instance of PersonDetailViewController in PersonListViewController and calling:
#import "PersonListViewController.h"
#import "Person.h"
#import "PersonDetailViewController.h"
@implementation PersonListViewController
- (IBAction)myMethod:(id)sender {
NSDictionary *person = [[Person alloc] initFromTestArray:[sender tag]];
[personDetailViewController setPerson:person];
[[personDetailViewController person] describe];
}
@end
And I'm then informed that:
warning: 'UIViewController' may not respond to '-setPerson' (Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.)
warning: 'UIViewController' may not respond to '-person'
it does actually respond just fine, but I cannot figure out how to organise my headers so that the compiler would know what will respond...
I'm all out of Google... hope I've given enough info and somebody can help.
Thanks a heap!