VGSLabel
@MainActor
public final class VGSLabel : UIView, VGSLabelProtocol
A view that displays revealed text data.
-
Text format to copy.
See moreDeclaration
Swift
@objc public enum CopyTextFormat : Int
-
The object that acts as the delegate of the VGSLabel.
Declaration
Swift
@MainActor public weak var delegate: VGSLabelDelegate?
-
Add transformation regex to format raw revealed text.
Declaration
Swift
@MainActor public func addTransformationRegex(_ regex: NSRegularExpression, template: String)Parameters
regexNSRegularExpressionobject, transformation regex.templateStringobject, template for replacement. -
Name that will be associated with
VGSLabeland used as a decoding contentPath on request response with revealed data from your organization vault.Declaration
Swift
@MainActor public var contentPath: String! { get set } -
A Boolean value indicating whether
VGSLabelstring is empty.Declaration
Swift
@MainActor public var isEmpty: Bool { get } -
Revealed text length.
Declaration
Swift
@MainActor public var revealedRawTextLength: Int { get } -
Placeholder text.
Declaration
Swift
@MainActor public var placeholder: String? { get set } -
Placeholder text styles.
Declaration
Swift
@MainActor public var placeholderStyle: VGSPlaceholderLabelStyle { get set } -
Boolflag. Apply secure mask iftrue. If secure range is not defined mask all text. Default isfalse.Declaration
Swift
@MainActor public var isSecureText: Bool { get set } -
Text Symbol that will replace visible label text character when securing String. Should be one charcter only.
Declaration
Swift
@MainActor public var secureTextSymbol: String { get set } -
Clear last revealed text and set it to
nil. IMPORTANT! New request is required to populate label with revealed data.Declaration
Swift
@MainActor public func clearText() -
Copy text to pasteboard with format.
Declaration
Swift
@MainActor public func copyTextToClipboard(format: CopyTextFormat = .raw)Parameters
formatVGSLabel.CopyTextFormatobject, text format to copy. Default is.raw. -
Set text range to be replaced with
VGSLabel.secureTextSymbol.Declaration
Swift
@MainActor public func setSecureText(start: Int? = nil, end: Int? = nil)Parameters
startIntobject. Defines range start, should be less or equal toendand string length. Default isnil.endIntobject. Defines range end, should be greater or equal toendand string length. Default isnil. -
Set array of text ranges to be replaced with
VGSLabel.secureTextSymbol.Declaration
Swift
@MainActor public func setSecureText(ranges: [VGSTextRange])Parameters
ranges[VGSTextRange]object, an array ofVGSTextRangeobjects to be applied subsequently.
-
UIEdgeInsetsfor text. IMPORTANT! Paddings should be non-negative.Declaration
Swift
@MainActor public var paddings: UIEdgeInsets { get set } -
UIEdgeInsetsfor placeholder. Default isnil. If placeholder paddings not set,paddingsproperty will be used to control placeholder insets. IMPORTANT! Paddings should be non-negative.Declaration
Swift
@MainActor public var placeholderPaddings: UIEdgeInsets? { get set } -
The natural size for the Lbel, considering only properties of the view itself.
Declaration
Swift
@MainActor public override var intrinsicContentSize: CGSize { get }
-
A succinct label in a localized string that identifies the accessibility element.
Declaration
Swift
@MainActor public var vgsAccessibilityLabel: String? { get set } -
A localized string that contains a brief description of the result of performing an action on the accessibility element.
Declaration
Swift
@MainActor public var vgsAccessibilityHint: String? { get set } -
Boolean value that determinates if the text field should be exposed as an accesibility element.
Declaration
Swift
@MainActor public var vgsIsAccessibilityElement: Bool { get set }
-
Indicates whether
VGSLabelshould automatically update its font when the device’sUIContentSizeCategoryis changed. It only works automatically with dynamic fontsDeclaration
Swift
@MainActor public var vgsAdjustsFontForContentSizeCategory: Bool { get set } -
VGSLabeltext font. By default use default dynamic font style.bodyto update its size automatically when the device’sUIContentSizeCategorychanged.Declaration
Swift
@MainActor public var font: UIFont? { get set } -
Number of lines.
Declaration
Swift
@MainActor public var numberOfLines: Int { get set } -
VGSLabeltext color.Declaration
Swift
@MainActor public var textColor: UIColor? { get set } -
VGSLabeltext alignment.Declaration
Swift
@MainActor public var textAlignment: NSTextAlignment { get set } -
VGSLabelline break mode.Declaration
Swift
@MainActor public var lineBreakMode: NSLineBreakMode { get set } -
VGSLabellayer corner radius.Declaration
Swift
@MainActor public var cornerRadius: CGFloat { get set } -
VGSLabellayer borderWidth.Declaration
Swift
@MainActor public var borderWidth: CGFloat { get set } -
VGSLabellayer borderColor.Declaration
Swift
@MainActor public var borderColor: UIColor? { get set }
-
VGSLabelminimum text line height.Declaration
Swift
@MainActor public var textMinLineHeight: CGFloat { get set } -
VGSLabeltext character spacing.Declaration
Swift
@MainActor public var characterSpacing: CGFloat { get set }
View on GitHub