VGSLabel
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
public weak var delegate: VGSLabelDelegate?
-
Add transformation regex to format raw revealed text.
Declaration
Swift
public func addTransformationRegex(_ regex: NSRegularExpression, template: String)
Parameters
regex
NSRegularExpression
object, transformation regex.template
String
object, template for replacement. -
Name that will be associated with
VGSLabel
and used as a decoding contentPath on request response with revealed data from your organization vault.Declaration
Swift
public var contentPath: String! { get set }
-
A Boolean value indicating whether
VGSLabel
string is empty.Declaration
Swift
public var isEmpty: Bool { get }
-
Revealed text length.
Declaration
Swift
public var revealedRawTextLength: Int { get }
-
Placeholder text.
Declaration
Swift
public var placeholder: String? { get set }
-
Placeholder text styles.
Declaration
Swift
public var placeholderStyle: VGSPlaceholderLabelStyle { get set }
-
Bool
flag. Apply secure mask iftrue
. If secure range is not defined mask all text. Default isfalse
.Declaration
Swift
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
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
public func clearText()
-
Copy text to pasteboard with format.
Declaration
Swift
public func copyTextToClipboard(format: CopyTextFormat = .raw)
Parameters
format
VGSLabel.CopyTextFormat
object, text format to copy. Default is.raw
. -
Set text range to be replaced with
VGSLabel.secureTextSymbol
.Declaration
Swift
public func setSecureText(start: Int? = nil, end: Int? = nil)
Parameters
start
Int
object. Defines range start, should be less or equal toend
and string length. Default isnil
.end
Int
object. Defines range end, should be greater or equal toend
and string length. Default isnil
. -
Set array of text ranges to be replaced with
VGSLabel.secureTextSymbol
.Declaration
Swift
public func setSecureText(ranges: [VGSTextRange])
Parameters
ranges
[VGSTextRange]
object, an array ofVGSTextRange
objects to be applied subsequently.
-
UIEdgeInsets
for text. IMPORTANT! Paddings should be non-negative.Declaration
Swift
public var paddings: UIEdgeInsets { get set }
-
UIEdgeInsets
for placeholder. Default isnil
. If placeholder paddings not set,paddings
property will be used to control placeholder insets. IMPORTANT! Paddings should be non-negative.Declaration
Swift
public var placeholderPaddings: UIEdgeInsets? { get set }
-
The natural size for the Lbel, considering only properties of the view itself.
Declaration
Swift
public override var intrinsicContentSize: CGSize { get }
-
A succinct label in a localized string that identifies the accessibility element.
Declaration
Swift
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
public var vgsAccessibilityHint: String? { get set }
-
Boolean value that determinates if the text field should be exposed as an accesibility element.
Declaration
Swift
public var vgsIsAccessibilityElement: Bool { get set }
-
Indicates whether
VGSLabel
should automatically update its font when the device’sUIContentSizeCategory
is changed. It only works automatically with dynamic fontsDeclaration
Swift
public var vgsAdjustsFontForContentSizeCategory: Bool { get set }
-
VGSLabel
text font. By default use default dynamic font style.body
to update its size automatically when the device’sUIContentSizeCategory
changed.Declaration
Swift
public var font: UIFont? { get set }
-
Number of lines.
Declaration
Swift
public var numberOfLines: Int { get set }
-
VGSLabel
text color.Declaration
Swift
public var textColor: UIColor? { get set }
-
VGSLabel
text alignment.Declaration
Swift
public var textAlignment: NSTextAlignment { get set }
-
VGSLabel
line break mode.Declaration
Swift
public var lineBreakMode: NSLineBreakMode { get set }
-
VGSLabel
layer corner radius.Declaration
Swift
public var cornerRadius: CGFloat { get set }
-
VGSLabel
layer borderWidth.Declaration
Swift
public var borderWidth: CGFloat { get set }
-
VGSLabel
layer borderColor.Declaration
Swift
public var borderColor: UIColor? { get set }
-
VGSLabel
minimum text line height.Declaration
Swift
public var textMinLineHeight: CGFloat { get set }
-
VGSLabel
text character spacing.Declaration
Swift
public var characterSpacing: CGFloat { get set }