-
Notifications
You must be signed in to change notification settings - Fork 3
LayerView
A layer-backed view with additional APIs for setting background color, border width, border color, and corner radius.
open class LayerView: NSView
Use if you do not need to do custom drawing.
Supports animations.
NSView
public override init(frame frameRect: NSRect)
public required init?(coder: NSCoder)
The background color of the view.
var backgroundColor = NSColor.clear
The default value is no color.
Animatable.
The width of the border around the view.
var borderWidth: BorderWidth
The default value is 0.
To animate, use animatableBorderWidthInPoints
or
animatableBorderWidthInPixels
.
An animatable version of the borderWidth
property. Values
are in points.
var animatableBorderWidthInPoints: CGFloat = 0
The fromValue
of the animation will be automatically set
to the current value of borderWidth
.
An animatable version of the borderWidth
property. Values
are in pixels.
var animatableBorderWidthInPixels: CGFloat = 0
The fromValue
of the animation will be automatically set
to the current value of borderWidth
.
The color of the border around the view.
var borderColor = NSColor.black
The default value is opaque black.
Animatable.
The radius of the rounded corners of the view.
var cornerRadius: CGFloat = 0
The default value is 0.
Animatable.
var wantsUpdateLayer: Bool
open override func encode(with aCoder: NSCoder)
open override func updateLayer()
open override func viewDidChangeBackingProperties()
open override class func defaultAnimation(forKey key: NSAnimatablePropertyKey) -> Any?
open override func animation(forKey key: NSAnimatablePropertyKey) -> Any?
Generated at 2020-11-27T07:13:09+0000 using swift-doc 1.0.0-beta.5.