In my mainViewController i have a container. Inside this container are two ViewControllers. Now I made a function to switch between these two ViewControllers. This function is controlled by a pushbutton. This works as long as the pushbutton is inside the mainViewController. Now I want the pushButton to be inside the toolbar. It was possible to add a pushbutton to the toolbar manually. But I can´t connect it with the switch() function inside the main ViewController.
Thanks for any suggestion!