I've got a TabBar App with 3 tabs, where each Tab is of the UINavigationController class. The layout is:
-Tab1 - is of class type UINavigationController, which loads ViewController1
-Tab2 - is of class type UINavigationController, which loads ViewController2
-Tab3 - is of class type UINavigationController, which loads ViewController3
The first 2 ViewControllers are fairly straightforward:
-ViewController1 has its own xib that contains buttons which load (push) other views
-ViewController2 has its own xib that contains buttons which load (push) other views
So far so good - no errors, runs perfectly.
HOWEVER: -ViewController3 loads another UINavigationController, which loads its own View-Controller - which we'll call ViewController4. This actually also works well, but when you click on ANY of the buttons in ViewController4 - the App crashes.
This is the error I get:
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[homeVC directionsParkingButton:]: unrecognized selector sent to instance 0x4b5a9c0'
Its as if it doesn't know where to find the xibs that its buttons are hooked up to - or something.
Now, I checked and verified that there's nothing wrong with this particular NavigationController: I created a 4th tab and hooked it up to this NavigationController - and everything works: the NavigationController loads ViewController4, which loads its own xib containing buttons which successfully navigate you to subviews (and back) - so there's nothing wrong with the set-up there.
Its when NavigationController4 is loaded into NavigationController3 that things go bad. I'm guessing its got something to do with the nesting of one NavigationController inside the other. So, how do I fix this? Or was this approach bad to begin with?
Any tips would be greatly appreciated!