protected override void OnDetached() { UIView recipient = Control == null ? Container : Control; if (gradientSubView != null) { gradientSubView.RemoveFromSuperview(); gradientSubView.Dispose(); gradientSubView = null; } }
protected override void OnAttached() { UIView recipient = Control == null ? Container : Control; try { gradientSubView = new GradientUIView(recipient.Bounds, (GradientEffect)Element.Effects.First(e => e is GradientEffect)); recipient.InsertSubview(gradientSubView, 0); } catch (Exception ex) { Exception ex2 = ex; } }