EnterpriseDS Documentation

Class DSNumber​Input​Mask

public class DSNumberInputMask: DSInputMask  

An input mask, when assigned to a DSTextField, will enforce use of a number pad for numeric entry where only digits are allowed.

let textField = DSTextField()

textField.inputMask = DSNumberInputMask()
DSNumberInputMask DSNumberInputMask DSInputMask DSInputMask DSNumberInputMask->DSInputMask

Conforms To

DSInputMask

A masking object that controls what can be legally typed into a DSTextField and handles type formatting while that typing takes place. They do not validate but often "partner" up with validation rules.

Initializers

init()

public init()  

Properties

keyboard​Type

public var keyboardType: UIKeyboardType?  

Only numbers are needed to enter a number.

Methods

raw​Text(from:​)

public func rawText(from text: String) -> String  

The entered text.

should​Allow(replacement​String:​resulting​String:​)

public func shouldAllow(replacementString string: String, resultingString: String) -> Bool  

Only allow numeric digits.

apply​Formatting​Mask(to:​)

public func applyFormattingMask(to text: String) -> String