I'm quite new to the iPhone SDK (I come from an actionscript background), and I am getting this error in my project: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
I've searched google for the last couple hours and unable to find a solution.
here is the code from AppDelegate.h
and the .m file
if I comment out the line with the warning everything else works. If I run it with the warning this is what the log tells me:
[SecondViewController view]: unrecognized selector sent to class 0x42a0'
I'm guessing this is likely a simple fix, but searching forums for me hasn't turned up any useful results.
any help with this will be greatly appreciated. thanks in advance
I've searched google for the last couple hours and unable to find a solution.
here is the code from AppDelegate.h
Code:
#import <UIKit/UIKit.h>
@class feed_me_itViewController, SecondViewController;
@interface feed_me_itAppDelegate : NSObject <UIApplicationDelegate> {
IBOutlet UIWindow *window;
IBOutlet feed_me_itViewController *viewController;
IBOutlet SecondViewController *SecondViewController;
}
-(void)backToFirst;
-(void)goToSecond;
-(void)backToSecond;
-(void)goToThird;
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet feed_me_itViewController *viewController;
@property (nonatomic, retain) IBOutlet SecondViewController *SecondViewController;
@end
and the .m file
Code:
#import "feed_me_itAppDelegate.h"
#import "feed_me_itViewController.h"
#import "SecondViewController.h"
@implementation feed_me_itAppDelegate
@synthesize window;
@synthesize viewController;
@synthesize SecondViewController;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after app launch
[window addSubview:viewController.view];
[window makeKeyAndVisible];
}
-(void)backToFirst{
}
-(void)goToSecond{
SecondViewController *aSecondView = [[SecondViewController alloc] initWithNibName:@"SecondView" bundle:nil];
[self setSecondViewController:aSecondView];
[aSecondView release];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:window cache:YES];
[viewController.view removeFromSuperview];
[self.window addSubview:[SecondViewController view]];
WARNING: 'SecondViewController' may not respond to '+view'
(Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.)
[UIView commitAnimations];
}
-(void)backToSecond{
}
-(void)goToThird{
}
- (void)dealloc {
[viewController release];
[SecondViewController release];
[window release];
[super dealloc];
}
@end
if I comment out the line with the warning everything else works. If I run it with the warning this is what the log tells me:
[SecondViewController view]: unrecognized selector sent to class 0x42a0'
I'm guessing this is likely a simple fix, but searching forums for me hasn't turned up any useful results.
any help with this will be greatly appreciated. thanks in advance