Created
December 5, 2015 10:57
-
-
Save olegtyshcneko/edf9f697c822ae3691b0 to your computer and use it in GitHub Desktop.
xamarin ViewController add child helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void AddViewControllerAsChild(UIViewController child, UIViewController parent) { child.WillMoveToParentViewController(parent); parent.AddChildViewController(child); parent.View.AddSubview(child.View); child.DidMoveToParentViewController(parent); } private void RemoveChildViewController(UIViewController child) { child.WillMoveToParentViewController(null); child.RemoveFromParentViewController(); child.View.RemoveFromSuperview(); child.DidMoveToParentViewController(null); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment