I use a Main ViewController and a Navigation ViewController. If the user uses the Navigation, the Navigation ViewController takes 80% of the Screen and the Main ViewController the other 20%. In this Case the user shouldn't interact with the Main ViewController.
How could i disable the interaction with the Main ViewController temporarily?
EDIT: This declares the further Problems:
This works partially fine. Now the User can't interact with the MainViewController if the Navigation is open, but this generates 2 other Problems:
Problem: The User can interact with NavigationView at the place (20% of the App on the right side) of the MainView. The user shouldn't do an interaction worth the lower NavigationController (Navigation)
Problem: The User can't drag on the 20% of the MainView to close the NavigationView and open the MainView complete.
I think it could be a reason to disable the interaction with all Objects with be hierarchical under the MainView. Is this possible if i do this in a function of another ViewController? The difficulty is, that i should do this for different kinds of "MainViews". Sometimes it includes only a TableViewController, sometimes its a cluster of UIButtons, and so on.
mainViewController.view.userInteractionEnabled = FALSE
should work for you.This shuts off the view from responding to touches.
Now i like to show you my Solution, maybe someone got an similar problem. (I hope its ok, that i show this in a new Post and not an Edit, otherwise i cant check it as solved)
If the MainViewContent shouldn't be user interacted:
If the MainViewContent is free for interaction: