I am seeing constraints errors in my output window when I invoke a UIViewController using PresentViewController
Here is what my view heirarchy looks like:
- MainViewController (RootViewController)
- Outer MainVC Button
- Nested UINavigationController (Nav1)
- FirstViewController (Nav1.RootViewController)
- Nested FirstVC Button
- FirstViewController (Nav1.RootViewController)
- MyModalViewController (Presented by invoking PresentViewController)
- dismiss button
Everything works as expected when MyModalViewController is shown from the Outer MainVC Button, but when I do the same from the Nested FirstVCButton and dismiss it to return back, I get constraint errors and the Nav1 is gone from the MainViewController
I just want to understand why this is happening and any potential workarounds are also welcome.
Full Source Code replicating this issue can be found here https://github.com/raghurana/XamarinIosAutoLayoutBug
Edit
It's a requirement to present MyModalViewController (well modally, thus PresentViewController instead of Push Or Show) due to UX design requirements.