---
title: mask
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiview/mask
---

# mask

An optional view whose alpha channel is used to mask a view’s content.

## Declaration

```swift
var mask: UIView? { get set }
```

## Discussion

Discussion The view’s alpha channel determines how much of the view’s content and background shows through. Fully or partially opaque pixels allow the underlying content to show through but fully transparent pixels block that content.

## See Also

### Configuring a view’s visual appearance

- [backgroundColor](uikit/uiview/backgroundcolor.md)
- [isHidden](uikit/uiview/ishidden.md)
- [alpha](uikit/uiview/alpha.md)
- [isOpaque](uikit/uiview/isopaque.md)
- [tintColor](uikit/uiview/tintcolor.md)
- [tintAdjustmentMode](uikit/uiview/tintadjustmentmode-swift.property.md)
- [clipsToBounds](uikit/uiview/clipstobounds.md)
- [clearsContextBeforeDrawing](uikit/uiview/clearscontextbeforedrawing.md)
- [layerClass](uikit/uiview/layerclass.md)
- [layer](uikit/uiview/layer.md)
