Here is the setup:
1) Single View Controller - inital Cobntroller = with a button.
2) Tab Bar Controller controller with 1 View Controller - Label
When I press the button it will segue over to the Tab View.
Now I want to use the prepareForSegue to pass over a String to update the label of the 1 View Controller inside the Tab Bar Controller.
When I do this I get a
"unrecognized selector sent to instance".
So I cab segue to the Tab View Controller.
However I am not able to reference the ViewController inside the Tab.
How can I fix this ?
The problem is that you cannot segue from a single view to a TabBarController. Instead, use code like this:
That will transition between controllers. You can change the animation type to suit your purpose. This is set with the options parameter; currently showing UIViewAnimationOptionTransitionFlipFromRight.
"SetupViewController" is the Storyboard ID (without the quotes) entered into the identity inspector (3rd icon from the right) for the TabViewController. You can change this to match what you have entered.