setBackgroundColor(_:)
Changes the background color for the group container.
Declaration
func setBackgroundColor(_ color: UIColor?)Parameters
- color:
The solid background color to be displayed behind all items in the group. Specify
nilto remove the custom color you previously set using this method.
Discussion
If you do not specify a custom background color or if you set the custom color to nil, the group uses the color assigned to the group object in your storyboard file. The default background color is clear.
If you set a custom background image for the group, the image is displayed on top of the background color. If the image contains any transparency, the background color shows through the transparent portions of the image.
Changes to the background color of a group are animatable.
See Also
Related Documentation
- App Programming Guide for watchOS