Error: Messages without a matching method signature will be assumed to return 'id' an

Discussion in 'iOS Programming' started by ryMac, Jun 11, 2009.

  1. ryMac macrumors newbie

    Jun 11, 2009
    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

    #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;
    @property (nonatomic, retain) IBOutlet UIWindow *window;
    @property (nonatomic, retain) IBOutlet feed_me_itViewController *viewController;
    @property (nonatomic, retain) IBOutlet SecondViewController *SecondViewController;
    and the .m file

    #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];
         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)dealloc {
        [viewController release];
         [SecondViewController release];
        [window release];
        [super dealloc];
    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
  2. Darkroom Guest


    Dec 15, 2006
    Montréal, Canada
    maybe totally wrong, but it might have something to do with your pointer to SecondViewController sharing the same name?

    what happens if you change it:
    SecondViewController *[COLOR="Red"]s[/COLOR]econdViewController;
  3. ryMac thread starter macrumors newbie

    Jun 11, 2009
    That was it. Thank you so much I spent the last 2 hours trying to figure out why I was getting this warning. Sometimes it helps to have a second pair of eyes. Thanks so much!

Share This Page