I Have a ViewController that I want to display over another viewController (like a popup), so I use this code:
MyViewController vc = new MyViewController();
this.View.AddSubview(vc.View);
And it works fine, but I am not sure to unload it correctly since I am not able to interact with the background view anymore, I use this code (from the MyViewController class) to unload it:
foreach (UIView view in this.View.Subviews) {
view.RemoveFromSuperview();
}
How can I remove the subview within the second viewcontroller itself and enable the first view again?
Thanks!!!