private void CreateMaskIfNeeded() { if (Shimmering && _maskLayer == null) { _maskLayer = new ShimmeringMaskLayer(); if (_contentLayer != null) { _contentLayer.Mask = _maskLayer; } UpdateMaskColors(); UpdateMaskLayout(); } }
private void ClearMask() { if (_maskLayer == null) { return; } bool disableActions = CATransaction.DisableActions; CATransaction.DisableActions = true; _maskLayer = null; if (_contentLayer != null) { _contentLayer.Mask = null; } CATransaction.DisableActions = disableActions; }