Hi,
I have created a sample setup where there is one instance created of uiviewcontroller that is opened and displayed via swift-code
From that uiviewcontroller there is a segue to another viewcontroller, eventually it displays an endviewcontroller on which there is a button to display the first instance of the uiviewcontroller.
Unfortunately it crashes while opening with this error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <testMultipleUIView.EndViewController: 0x7fe6d0427730>.
i've added the sourcecode here:
https://github.com/onstwedder/UIViewController
Basically if you click every button on the screen it will cause the crash.
It's build in the latest (Stable) version of sdk.
Can anyone please help me how i can set it up so it won't try to present modally or how i can get it to "pop" the active?
Many thanks - cuz i am so stuck 😟
PS: The reason why I use the instance is that in the original program in which i also have this occurence, the instance viewcontroller is the gameviewcontroller. Which i want to restart the model on (and which is listening to notifications) - so i dont want it to create new occurences of the uiviewcontroller.