I am facing a strange problem in iOS iPad app. My application is crashing when I map a UIButton to an IBAction with touch up inside event. The error I get in the console is like
Unrecognized selector NSInvalidArgumentException.
By the way all the view controllers in my project have the same problem. The view controllers are mapped to a tab bar controller.
I have created this project by dragging and dropping all the files from another project. The dragged files are placed properly in the current project, no problem with that. Will this cause problem?
I was not able to figure out what went wrong.
Thanks
Thanks for your answers. I have resolved the problem.
Actual Problem:
Actually i am navigating to a new view from one view to other by adding it as subview by clicking a button with
IBActionas below,3 . As the project is with ARC, the object myViewController is released since this is a local variable. So when i press back button to do
the app was getting crashed.
Solution:
So when i just declared
MyViewController myViewControllerin .h file and also given@propertyand@synthesize. Then changed theIBActionwith,Now the problem solved.
Thanks.