/// <summary> /// Add an view controller and add its view to the parent. /// </summary> /// <returns><c>true</c>If the VC is added to the parent children array,<c>false</c> otherwise.</returns> /// <param name="_newController">_new controller.</param> public void AddAndDisplayController(AspyViewController _newController) { //_newController.WillMoveToParentViewController (this); this.AddChildViewController(_newController); this.View.AddSubview(_newController.View); _newController.DidMoveToParentViewController(this); }
/// <summary> /// Add an view controller and add its view to the parent. /// </summary> /// <returns><c>true</c>If the VC is added to the parent children array,<c>false</c> otherwise.</returns> /// <param name="_newController">_new controller.</param> public virtual void AddAndDisplayController(AspyViewController _newController, CGRect _frame) { this.AddChildViewController(_newController); // Add View and subview _newController.View.Frame = _frame; this.View.AddSubview(_newController.View); _newController.DidMoveToParentViewController(this); }
public virtual void AddAndDisplayController(AspyViewController _newController) { this.AddChildViewController(_newController); // Add View and subviews // Took the frame assign out, cant see a need for it. //_newController.View.Frame = this.View.Frame; this.View.AddSubview(_newController.View); _newController.DidMoveToParentViewController(this); }