void OnRemoveSubviews(object sender, EventArgs e)
 {
     if (parentView != null)
     {
         parentView.RemoveFromSuperview();
         parentView = null;
     }
 }
Esempio n. 2
0
 void OnRemoveSubviews(object sender, EventArgs e)
 {
     if (parentView != null)
     {
         parentView.RemoveFromSuperview();
         // This fixes the problem - 1st approach
         //parentView.Dispose ();
         parentView = null;
     }
 }
Esempio n. 3
0
        void OnAddSubviews(object sender, EventArgs e)
        {
            if (this.parentView != null)
            {
                return;
            }

            parentView = new CustomParentView {
                BackgroundColor = UIColor.Yellow,
                Frame           = new CGRect(0, 0, 200, 200),
                Center          = this.View.Center
            };

            Add(parentView);
        }