RVS_RetroLEDDigitalDisplay
@IBDesignable
open class RVS_RetroLEDDigitalDisplay : UIImageView
The display is a subclass of UIImageView. We do this, so we can easily have a background image.
-
This allows you to apply a “skew” to the widget. This means that there is a “lean,” like many classic LED displays. A positive skew, means that the widget “leans right,” with the top moving right, and the bottom, moving left. A negative skew, is in the other direction. This is limited to -1…1. This will change the size of the widget, horizontally (but not vertically).
Declaration
Swift
@IBInspectable var skew: CGFloat { get set }
-
This is the duration of change animations. Default is 1/8 of a second (125 mS). 0 disables the animation.
Declaration
Swift
@IBInspectable var animationDurationInSeconds: CGFloat { get set }
-
The starting color for the “On” gradient.
Declaration
Swift
@IBInspectable var onGradientStartColor: UIColor? { get set }
-
The ending color. If not provided, then the starting color is used.
Declaration
Swift
@IBInspectable var onGradientEndColor: UIColor? { get set }
-
The angle of the gradient, in degrees. 0 (default) is top-to-bottom. Zero is top-to-bottom. Negative is counter-clockwise, and positive is clockwise.
Declaration
Swift
@IBInspectable var onGradientAngleInDegrees: CGFloat { get set }
-
The starting color for the “Off” gradient.
Declaration
Swift
@IBInspectable var offGradientStartColor: UIColor? { get set }
-
The ending color. If not provided, then the starting color is used.
Declaration
Swift
@IBInspectable var offGradientEndColor: UIColor? { get set }
-
The angle of the gradient, in degrees. 0 (default) is top-to-bottom. Zero is top-to-bottom. Negative is counter-clockwise, and positive is clockwise.
Declaration
Swift
@IBInspectable var offGradientAngleInDegrees: CGFloat { get set }
-
This is true, if values are to be displayed with leading zeores.
Declaration
Swift
@IBInspectable var hasLeadingZeroes: Bool { get set }
-
This is the number of digits for this group. 0 (or less), means no display.
Declaration
Swift
@IBInspectable var numberOfDigits: Int { get set }
-
This is how many calculation (not display) units separate each digit. Default is 8.
Declaration
Swift
@IBInspectable var gap: CGFloat { get set }
-
This property allows you to assign an image to the on segments. If this is set to an image (non-nil), then that will supersede the gradient colors.
Declaration
Swift
@IBInspectable var onImage: UIImage? { get set }
-
This is a numerical value to set to the collected digits. If we have an animation duration, the old value will fade.
Declaration
Swift
@IBInspectable var value: Int { get set }
-
Read-only value that returns the minimum possible value for this instance (always -2).
Declaration
Swift
var minValue: Int { get }
-
Read-only value that returns the maximum possible value for this instance.
Declaration
Swift
var maxValue: Int { get }
-
The ideal aspect ratio (X / Y) of the display.
Declaration
Swift
var idealAspect: CGFloat { get }
-
The numerical base of the display (2, 8, 10, 16). 16 is default. If you set a different radix from the ones listed, the set will be refused.
Declaration
Swift
var radix: Int? { get set }
-
This property allows you to assign an image to the off segments. If this is set to an image (non-nil), then that will supersede the gradient colors.
Declaration
Swift
override var image: UIImage? { get set }
-
Called when the views are to be laid out. Most of the action happens here.
Declaration
Swift
override func layoutSubviews()