Error-[UIViewController NextView:]: unrecognized selector sent to instance

Discussion in 'iOS Programming' started by pitchai.pazhani, Jan 18, 2011.

  1. pitchai.pazhani, Jan 18, 2011
    Last edited by a moderator: Jan 18, 2011

    macrumors newbie

    Joined:
    Jan 18, 2011
    #1
    Hi,

    I am developing an Universal Application. I have tabcontroller in my application and each tab displaying different views.

    Now the problem is, when I have a button in any views, it displays the above error.
    ________________________________________________________

    Code:
    @interface ScreenFourViewController : UIViewController {
    
    }
    -(IBAction)NextView:(id)sender;
    
    @end
    
    _______________________________________________________


    Code:
    @implementation ScreenFourViewController
    
    -(IBAction)NextView:(id)sender
    {
    	NSLog(@"Start button pressed");	}
    
    _______________________________________________________

    What am I doing wrong? Please help me.

    Also, I want to change the views of a particular tab, when I click the next button from the current view.
     
  2. macrumors 6502

    Joined:
    Aug 29, 2010
    #2
    Looks to me like you're trying to send "nextView" to UIViewController.... You should probably be sending it to an instance of ScreenFourViewController. Or, if you're trying to call NextView from within ScreenFourViewController...send NextView to self.
     

Share This Page