/// <summary> /// UIView override to update our gradient layer's size to match our view's bounds whenever the bounds are /// changing /// </summary> public override void LayoutSubviews() { var layer = XFGlossGradientLayer.GetGradientLayer(this); if (layer != null) { layer.Frame = new CGRect(CGPoint.Empty, Frame.Size); } base.LayoutSubviews(); }
/// <summary> /// Updates the associated <see cref="T:XFGloss.iOS.Views.XFGlossGradientLayer"/> instance's steps collection. /// </summary> /// <param name="steps">The steps collection to assign</param> public void UpdateSteps(GradientStepCollection steps) { var layer = XFGlossGradientLayer.GetGradientLayer(this); layer?.UpdateSteps(steps); }
/// <summary> /// Updates the associated <see cref="T:XFGloss.iOS.Views.XFGlossGradientLayer"/> instance's rotation value. /// </summary> /// <param name="rotation">An integer number between 0 and 359</param> public void UpdateRotation(int rotation) { var layer = XFGlossGradientLayer.GetGradientLayer(this); layer?.UpdateRotation(rotation); }