Here is the situation.
I am using a tabbar application. I have 2 tabs (views) each with their own view controllers.
FirstViewController (.m and .h)
SecondViewController (.m and .h)
I have changed files owner class identity to FirstViewController for FirstView.xib and I have changed files owner class identity to SecondViewController for SecondView.xib
Both views have a UIButton.
When i click the button on the opening (FirstView) pane it runs the corresponding action code it is hooked up to.
-(IBAction) button1Pressed{
NSLog(@"in button1Pressed");
}
I have similar code for the second button in the other pane.
-(IBAction) button2Pressed{
NSLog(@"in button2Pressed");
}
But when I click on the button on the second pane the application crashes with the following error
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController button2Pressed]: unrecognized selector sent to instance 0x59243b0'
I thought the UIViewController may be the class it is trying to find the method button2Pressed? I would find this odd though as I stated I have changed the files owner class identity to SecondViewController for SecondView.xib.
Sorry if some of the above seems a bit garbled, I have quite a bit of programming experience but I'm a noob at iPhone/objective c.
I am using a tabbar application. I have 2 tabs (views) each with their own view controllers.
FirstViewController (.m and .h)
SecondViewController (.m and .h)
I have changed files owner class identity to FirstViewController for FirstView.xib and I have changed files owner class identity to SecondViewController for SecondView.xib
Both views have a UIButton.
When i click the button on the opening (FirstView) pane it runs the corresponding action code it is hooked up to.
-(IBAction) button1Pressed{
NSLog(@"in button1Pressed");
}
I have similar code for the second button in the other pane.
-(IBAction) button2Pressed{
NSLog(@"in button2Pressed");
}
But when I click on the button on the second pane the application crashes with the following error
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController button2Pressed]: unrecognized selector sent to instance 0x59243b0'
I thought the UIViewController may be the class it is trying to find the method button2Pressed? I would find this odd though as I stated I have changed the files owner class identity to SecondViewController for SecondView.xib.
Sorry if some of the above seems a bit garbled, I have quite a bit of programming experience but I'm a noob at iPhone/objective c.