EMSecureInputBuilder
Objective-C
@protocol EMSecureInputBuilder <NSObject>
Swift
protocol EMSecureInputBuilder : NSObjectProtocol
The input builder v2 class that enables to build a secure input UI (secure keypad).
The secure input UI does not use the native UIKit keypad component but rather draws itself based on the configuration provided.
It supports the build of the secure input UI in both full screen and dialog mode, single or double entry UI. It also provides the flexibility for the application maker to fully customize the top screen UI or even override the custom OK button behavior.
The output of the secure keypad could be EMPinAuthInput or NSData. The integrator shall decide on which API to use depends on the application use case.
Since
4.4-
@brief Creates a secure input UI. The result of this API could be used directly to perform all OATH related operation e.g. generate OTP.
Warning
This method should be called once all the necessary configurations have been done. Note that the default configuration will be applied for attributes that have not been set to custom values. The keys and shift keys (optional) shall be in alpha numeric format.See
EMSecureInputBuilderDefaultConfigurations for the default configurations of the keypad.See
EMSecureInputUiOkButtonBehaviorSince
6.0Declaration
Objective-C
- (id<EMSecureInputUi>) buildWithScrambling:(BOOL)isScrambling isDoubleInputField:(BOOL)isDoubleInputField displayMode:(EMSecureInputUiDisplayMode)displayMode onFinishBlock:(EMSecureInputUiOnFinish)keyEnteredBlock;Swift
func build(withScrambling isScrambling: Bool, isDoubleInputField: Bool, displayMode: EMSecureInputUiDisplayMode, onFinish keyEnteredBlock: EMSecureInputUiOnFinish!) -> (any EMSecureInputUi)!Parameters
isScramblingIndicates if the keypad would have a scrambled key locations. The scrambling is completely random and different for each time the keypad is shown.
isDoubleInputFieldIndicates if the keypad would have two input fields to enter the key. This is useful in case of using the keypad for a new password and its confirmation. It’s important to be aware that the keypad itself will NOT perform any comparison of the two key. The application developer can use method [EMSecureContainer isEqual:] for an equality confirmation.
displayModeIndicates the keypad display mode (fullscreen, dialog or embedded).
keyEnteredBlockCallback on finish. Depends on the OK button behavior settings, the finish callback could be triggered by the user or system. For double entry mode, trigger the OK button will trigger the callback only if both input field key count hit the minimum input length.
Return Value
The secure input UI. The secure input UI view controller can be fed into a navigation controller or presented as a modal view controller in the current view. @exception NSInvalidArgumentException The exception when the improper configuration is set
-
@brief Creates a secure input UI. The result of this API is raw data and could be used as a PIN/password for the application.
Warning
This method should be called once all the necessary configurations have been done. Note that the default configuration will be applied for attributes that have not been set to custom values.See
EMSecureInputBuilderDefaultConfigurations for the default configurations of the keypad.See
EMSecureInputUiOkButtonBehaviorSince
6.0Declaration
Objective-C
- (id<EMSecureInputUi>) buildClearTextWithScrambling:(BOOL)isScrambling isDoubleInputField:(BOOL)isDoubleInputField displayMode:(EMSecureInputUiDisplayMode)displayMode onFinishBlock: (EMSecureInputUiOnFinishClearText)keyEnteredBlock;Swift
func buildClearText(withScrambling isScrambling: Bool, isDoubleInputField: Bool, displayMode: EMSecureInputUiDisplayMode, onFinish keyEnteredBlock: EMSecureInputUiOnFinishClearText!) -> (any EMSecureInputUi)!Parameters
isScramblingIndicates if the keypad would have a scrambled key locations. The scrambling is completely random and different for each time the keypad is shown.
isDoubleInputFieldIndicates if the keypad would have two input fields to enter the key. This is useful in case of using the keypad for a new password and its confirmation. It’s important to be aware that the keypad itself will NOT perform any comparison of the two key. The application developer can use method [EMSecureContainer isEqual:] for an equality confirmation.
displayModeIndicates the keypad display mode (fullscreen, dialog or embedded).
keyEnteredBlockCallback on finish. Depends on the OK button behavior settings, the finish callback could be triggered by the user or system. For double entry mode, trigger the OK button will trigger the callback only if both input field key count hit the minimum input length.
Return Value
The secure input UI. The secure input UI view controller can be fed into a navigation controller or presented as a modal view controller in the current view. @exception NSInvalidArgumentException The exception when the improper configuration is set
-
@brief Creates a secure input UI. The result of this API is raw data and could be used as a PIN/password for the application.
Warning
This method should be called once all the necessary configurations have been done. Note that the default configuration will be applied for attributes that have not been set to custom values. Notice: This method should be called after invoking {@link EMDetectorJailbreakStatus()} to make sure the device is not rooted.See
EMSecureInputBuilderDefaultConfigurations for the default configurations of the keypad.See
EMSecureInputUiOkButtonBehaviorSince
6.2Declaration
Objective-C
- (id<EMSecureInputUi>) buildEncryptedDataWithScrambling:(BOOL)isScrambling isDoubleInputField:(BOOL)isDoubleInputField displayMode:(EMSecureInputUiDisplayMode)displayMode encryptionConfig: (EMSecureInputEncryptionConfig *)encryptionConfig onFinishBlock:(EMSecureInputUiOnFinishEncryptedData) keyEnteredBlock;Swift
func buildEncryptedData(withScrambling isScrambling: Bool, isDoubleInputField: Bool, displayMode: EMSecureInputUiDisplayMode, encryptionConfig: EMSecureInputEncryptionConfig!, onFinish keyEnteredBlock: EMSecureInputUiOnFinishEncryptedData!) -> (any EMSecureInputUi)!Return Value
The encrypted secure input UI. The secure input UI view controller can be fed into a navigation controller or presented as a modal view controller in the current view. @exception NSInvalidArgumentException The exception when the improper configuration is set
-
Wipes all the sensitive data of the secure input builder. The method would also be automatically triggered upon the release of this object on the autorelease pool of the current thread.
It’s recommended to call this method at the end of the callback blockEMSecureInputUiOnFinishorEMSecureInputUiOnFinishClearText.
Note: Other non-sensitive configuration such as color setting and text-label setting won’t be reset in this function.Since
4.4Declaration
Objective-C
- (void)wipe;Swift
func wipe() -
Set secure input UI screen background color.
Since
4.4Declaration
Objective-C
- (void)setScreenBackgroundColor:(UIColor *)color;Swift
func setScreenBackgroundColor(_ color: UIColor!)Parameters
colorscreen background color. Screen background color cannot be nil.
-
Set secure input UI screen background image. The screen background image will be drawn on top of screen background color.
Since
6.0Declaration
Objective-C
- (void)setScreenBackgroundImage:(UIImage *)image contentMode: (EMSecureInputUiBackgroundImageContentMode)contentMode;Swift
func setScreenBackgroundImage(_ image: UIImage!, contentMode: EMSecureInputUiBackgroundImageContentMode)Parameters
imagescreen background image. Screen background image cannot be nil.
contentModescreen background image content mode.
-
Show or hide navigation bar.
Since
4.4Declaration
Objective-C
- (void)showNavigationBar:(BOOL)show;Swift
func showNavigationBar(_ show: Bool)Parameters
showshow or hide navigation bar.
-
Show or hide top screen.
See
[EMSecureInputUi customUiDelegate]Since
4.4Declaration
Objective-C
- (void)showTopScreen:(BOOL)show;Swift
func showTopScreen(_ show: Bool)Parameters
showshow or hide top screen.
YESto show default secure input UI.NOallows developer to customize the top screen. -
Set logo image and position.
Note
The logo image won’t be drawn on screen for custom top UI ([EMSecureInputBuilder showTopScreen:] set toNO).See
EMSecureInputUiLogoPositionSince
4.4Declaration
Objective-C
- (void)setLogoImage:(UIImage *)image andPosition:(EMSecureInputUiLogoPosition)position;Swift
func setLogoImage(_ image: UIImage!, andPosition position: EMSecureInputUiLogoPosition)Parameters
imagelogo image. Logo image cannot be nil.
positionlogo position.
-
Set logo bar background color.
Note
The logo bar background won’t be drawn on screen for custom top UI ([EMSecureInputBuilder showTopScreen:] set toNO).Since
4.4Declaration
Objective-C
- (void)setLogoBarBackgroundColor:(UIColor *)color;Swift
func setLogoBarBackgroundColor(_ color: UIColor!)Parameters
colorlogo bar background color. Logo bar background color cannot be nil.
-
Sets the first label.
Note
The first label won’t be drawn on screen for custom top UI ([EMSecureInputBuilder showTopScreen:] set toNO).Since
4.4Declaration
Objective-C
- (void)setFirstLabel:(NSString *)text;Swift
func setFirstLabel(_ text: String!)Parameters
textfirst label. First label cannot be nil. First label is assumed to be single line. Keep the first label as short as possible.
-
Set second text. Only applicable if double-entry mode is enabled when create the secure keypad.
Note
The second label won’t be drawn on screen for custom top UI ([EMSecureInputBuilder showTopScreen:] set toNO).Since
4.4Declaration
Objective-C
- (void)setSecondLabel:(NSString *)text;Swift
func setSecondLabel(_ text: String!)Parameters
textsecond label. Second label cannot be nil. Second label is assumed to be single line. Keep the second label as short as possible.
-
Set label color.
Note
The label color won’t be used for custom top UI ([EMSecureInputBuilder showTopScreen:] set toNO).Since
4.4Declaration
Objective-C
- (void)setLabelColor:(UIColor *)color;Swift
func setLabel(_ color: UIColor!)Parameters
colorlabel color. Label color cannot be nil.
-
Set label font size.
Note
The label font size won’t be used for custom top UI ([EMSecureInputBuilder showTopScreen:] set toNO).Since
4.4Declaration
Objective-C
- (void)setLabelFontSize:(CGFloat)fontSize;Swift
func setLabelFontSize(_ fontSize: CGFloat)Parameters
fontSizelabel font size. Label font size shall be greater than 0.
-
Set label alignment.
Note
The label alignment won’t be used for custom top UI ([EMSecureInputBuilder showTopScreen:] set toNO).See
EMSecureInputUiLabelAlignmentSince
4.4Declaration
Objective-C
- (void)setLabelAlignment:(EMSecureInputUiLabelAlignment)alignment;Swift
func setLabelAlignment(_ alignment: EMSecureInputUiLabelAlignment)Parameters
alignmentlabel alignment.
-
Set input field font size.
Note
The input field font size won’t be used for custom top UI ([EMSecureInputBuilder showTopScreen:] set toNO).Since
4.4Declaration
Objective-C
- (void)setInputFieldFontSize:(CGFloat)fontSize;Swift
func setInputFieldFontSize(_ fontSize: CGFloat)Parameters
fontSizeinput field font size. Input field font size shall be greater than 0.
-
Set input field border color for corresponding UI control state.
Note
The input field border color won’t be used for custom top UI ([EMSecureInputBuilder showTopScreen:] set toNO).See
EMSecureInputUiControlFocusStateSince
4.4Declaration
Objective-C
- (void)setInputFieldBorderColor:(UIColor *)color forState:(EMSecureInputUiControlFocusState)state;Swift
func setInputFieldBorderColor(_ color: UIColor!, for state: EMSecureInputUiControlFocusState)Parameters
colorinput field border color. Input field border color cannot be nil.
stateUI control state.
-
Set input field background color for corresponding UI control state.
Note
The input field background color won’t be used for custom top UI ([EMSecureInputBuilder showTopScreen:] set toNO).See
EMSecureInputUiControlFocusStateSince
4.4Declaration
Objective-C
- (void)setInputFieldBackgroundColor:(UIColor *)color forState:(EMSecureInputUiControlFocusState)state;Swift
func setInputFieldBackgroundColor(_ color: UIColor!, for state: EMSecureInputUiControlFocusState)Parameters
colorinput field background color. Input field background color cannot be nil.
stateUI control state.
-
Set minimum and maximum input length. Minimum and maximum input length shall be identical for the following OK button behavior:
EMSecureInputUiOkButtonNoneandEMSecureInputUiOkButtonCustom.See
[EMSecureInputBuilder setOkButtonBehavior:]See
EMSecureInputUiOkButtonBehaviorSince
4.4Declaration
Objective-C
- (void)setMinimumInputLength:(NSInteger)minimumLength andMaximumInputLength:(NSInteger)maximumLength;Swift
func setMinimumInputLength(_ minimumLength: Int, andMaximumInputLength maximumLength: Int)Parameters
minimumLengthminimum input length. Allowed minimum input length is [0,19]. Minimum input length should be smaller than maximum input length.
maximumLengthmaximum input length. Allowed maximum input length is [1,19].
-
Set number of rows and columns.
Since
4.4Declaration
Objective-C
- (void)setNumberOfRows:(NSInteger)numberOfRows andColumns:(NSInteger)numberOfColumns;Swift
func setNumberOfRows(_ numberOfRows: Int, andColumns numberOfColumns: Int)Parameters
numberOfRowsnumber of rows. Allowed number of rows is [1,8].
numberOfColumnsnumber of columns. Allowed number of columns is [2,8].
-
Set keypad height ratio.
Since
4.4Declaration
Objective-C
- (void)setKeypadHeightRatio:(CGFloat)ratio;Swift
func setKeypadHeightRatio(_ ratio: CGFloat)Parameters
ratiokeypad height ratio. Allowed keypad height ratio is [0.25,0.5].
-
By default, the OK button is located at the bottom left of the secure input UI and the Delete button is located at the bottom right of the secure input UI. Swap OK and Delete button if needed.
Since
4.4Declaration
Objective-C
- (void)swapOkAndDeleteButton;Swift
func swapOkAndDeleteButton() -
Set keys. The keys encoding shall be in NSUTF16StringEncoding format, using different encoding technique results in wrong display.
Since
6.0Declaration
Objective-C
- (void)setKeys:(NSData *)keys;Swift
func setKeys(_ keys: Data!)Parameters
keyskeypad keys. Keys cannot be nil. Allowed keys length is [1,32]. Keys length shall be smaller or equals to number of keypad matrix allocated.
-
Set keys and its subscripts. The keys encoding shall be in NSUTF16StringEncoding format, using different encoding technique results in wrong display.
Since
6.0Declaration
Objective-C
- (void)setKeys:(NSData *)keys andSubscripts:(NSArray *)subscripts;Swift
func setKeys(_ keys: Data!, andSubscripts subscripts: [Any]!)Parameters
keyskeypad keys. Keys cannot be nil. Allowed keys length is [1,32]. Keys length shall be smaller or equals to number of keypad matrix allocated.
subscriptssubscripts. Subscripts can be nil. Allowed subscripts length is [0,4].
-
Set shift keys and its subscripts. The shift keys encoding shall be in NSUTF16StringEncoding format, using different encoding technique results in wrong display.
Since
6.0Declaration
Objective-C
- (void)setShiftKeys:(NSData *)keys andSubscripts:(NSArray *)subscripts;Swift
func setShiftKeys(_ keys: Data!, andSubscripts subscripts: [Any]!)Parameters
keyskeypad keys. Keys cannot be nil. Allowed keys length is [1,32]. Keys length shall be smaller or equals to number of keypad matrix allocated.
subscriptssubscripts. Subscripts can be nil. Allowed subscripts length is [0,4]. @exception NSInvalidArgumentException The API will throw exception if the swapOkAndDeleteButton is enabled along with shift support.
-
Set OK button text.
Since
4.4Declaration
Objective-C
- (void)setOkButtonText:(NSString *)text;Swift
func setOkButtonText(_ text: String!)Parameters
textOK button text. OK button text cannot be nil. Allowed OK button text length is [1,14].
-
Set Delete button text.
Since
4.4Declaration
Objective-C
- (void)setDeleteButtonText:(NSString *)text;Swift
func setDeleteButtonText(_ text: String!)Parameters
textDelete button text. Delete button text cannot be nil. Allowed Delete button text length is [1,14].
-
Set Shift button text.
Since
4.4Declaration
Objective-C
- (void)setShiftButtonText:(NSString *)text;Swift
func setShiftButtonText(_ text: String!)Parameters
textShift button text. Shift button text cannot be nil. Allowed Shift button text length is [1,14].
-
Set distance between key and subscript.
Since
4.4Declaration
Objective-C
- (void)setDistanceBetweenKeyAndSubscript:(CGFloat)distance;Swift
func setDistanceBetweenKeyAndSubscript(_ distance: CGFloat)Parameters
distancedistance between key and subscript. Allowed distance between key and subscript is [0.0,4.0].
-
Set button border width.
Since
4.4Declaration
Objective-C
- (void)setButtonBorderWidth:(NSInteger)width;Swift
func setButtonBorderWidth(_ width: Int)Parameters
widthbutton border width. Allowed button border width is [1,10].
-
Set keypad frame color.
Since
4.6Declaration
Objective-C
- (void)setKeypadFrameColor:(UIColor *)color;Swift
func setKeypadFrameColor(_ color: UIColor!)Parameters
colorkeypad frame color. Keypad frame color cannot be nil.
-
Set the gradient start and end color for keypad grids which separates between the keys.
Since
4.6Declaration
Objective-C
- (void)setKeypadGridGradientColors:(UIColor *)startColor gridGradientEndColor:(UIColor *)endColor;Swift
func setKeypadGridGradientColors(_ startColor: UIColor!, gridGradientEnd endColor: UIColor!)Parameters
startColorsets color at both ends of the inner keypad border.
endColorsets color at middle of the inner keypad border.
-
Set button pressed visibility.
See
EMSecureInputBuilderDefaultConfigurations for the default configurations of the keypad.Since
4.4Declaration
Objective-C
- (void)setButtonPressedVisibility:(BOOL)visible;Swift
func setButtonPressedVisibility(_ visible: Bool)Parameters
visibleYESto enable the selected state of the button when it’s pressed. For security reason, it’s disabled by default. User won’t be able to see the selected state when the button is pressed. -
Set key font.
Since
4.4Declaration
Objective-C
- (void)setKeyFont:(UIFont *)font;Swift
func setKeyFont(_ font: UIFont!)Parameters
fontkey font. Key font cannot be nil. Allowed key font size is [1.0,100.0].
-
Set subscript font.
Since
4.4Declaration
Objective-C
- (void)setSubscriptFont:(UIFont *)font;Swift
func setSubscriptFont(_ font: UIFont!)Parameters
fontsubscript font. subscript font cannot be nil. Allowed subscript font size is [1,key font size].
-
Set OK button font.
Since
4.4Declaration
Objective-C
- (void)setOkButtonFont:(UIFont *)font;Swift
func setOkButtonFont(_ font: UIFont!)Parameters
fontOK button font. OK button font cannot be nil. Allowed OK button font size is [1.0,100.0].
-
Set Delete button font.
Since
4.4Declaration
Objective-C
- (void)setDeleteButtonFont:(UIFont *)font;Swift
func setDeleteButtonFont(_ font: UIFont!)Parameters
fontDelete button font. Delete button font cannot be nil. Allowed Delete button font size is [1.0,100.0].
-
Set Shift button font.
Since
6.0Declaration
Objective-C
- (void)setShiftButtonFont:(UIFont *)font;Swift
func setShiftButtonFont(_ font: UIFont!)Parameters
fontShift button font. Shift button font cannot be nil. Allowed Shift button font size is [1.0,100.0].
-
Set key color for corresponding UI state.
See
EMSecureInputUiControlStateSince
4.4Declaration
Objective-C
- (void)setKeyColor:(UIColor *)color forState:(EMSecureInputUiControlState)state;Swift
func setKeyColor(_ color: UIColor!, for state: EMSecureInputUiControlState)Parameters
colorkey color. Key color cannot be nil.
stateUI state.
-
Set subscript color for corresponding UI state.
See
EMSecureInputUiControlStateSince
4.4Declaration
Objective-C
- (void)setSubscriptColor:(UIColor *)color forState:(EMSecureInputUiControlState)state;Swift
func setSubscriptColor(_ color: UIColor!, for state: EMSecureInputUiControlState)Parameters
colorsubscript color. Subscript color cannot be nil.
stateUI state.
-
Set OK button text color for corresponding UI state.
See
EMSecureInputUiControlStateSince
4.4Declaration
Objective-C
- (void)setOkButtonTextColor:(UIColor *)color forState:(EMSecureInputUiControlState)state;Swift
func setOkButtonTextColor(_ color: UIColor!, for state: EMSecureInputUiControlState)Parameters
colorOK button text color. OK button text color cannot be nil.
stateUI state.
-
Set Delete button text color for corresponding UI state.
See
EMSecureInputUiControlStateSince
4.4Declaration
Objective-C
- (void)setDeleteButtonTextColor:(UIColor *)color forState:(EMSecureInputUiControlState)state;Swift
func setDeleteButtonTextColor(_ color: UIColor!, for state: EMSecureInputUiControlState)Parameters
colorDelete button text color. Delete button text color cannot be nil.
stateUI state.
-
Set Shift button text color for corresponding UI state.
See
EMSecureInputUiControlStateSince
6.0Declaration
Objective-C
- (void)setShiftButtonTextColor:(UIColor *)color forState:(EMSecureInputUiControlState)state;Swift
func setShiftButtonTextColor(_ color: UIColor!, for state: EMSecureInputUiControlState)Parameters
colorShift button text color. Shift button text color cannot be nil.
stateUI state. Shift button text color for disabled state is not supported.
-
Set button background color for corresponding UI state.
See
EMSecureInputUiControlStateSince
4.4Declaration
Objective-C
- (void)setButtonBackgroundColor:(UIColor *)color forState:(EMSecureInputUiControlState)state;Swift
func setButtonBackgroundColor(_ color: UIColor!, for state: EMSecureInputUiControlState)Parameters
colorbutton background color. Button background color cannot be nil.
stateUI state.
-
Set button background image.
Since
4.4Declaration
Objective-C
- (void)setButtonBackgroundImage:(UIImage *)image;Swift
func setButtonBackgroundImage(_ image: UIImage!)Parameters
imagebutton background image. Button background image cannot be nil.
-
Set button background image opacity for corresponding UI state.
See
EMSecureInputUiControlStateSince
4.4Declaration
Objective-C
- (void)setButtonBackgroundImageOpacity:(CGFloat)opacity forState:(EMSecureInputUiControlState)state;Swift
func setButtonBackgroundImageOpacity(_ opacity: CGFloat, for state: EMSecureInputUiControlState)Parameters
opacitybutton background image opacity. Allowed button background image opacity is [0.0,1.0].
stateUI state. Button background image opacity for selected state is not supported.
-
Set OK button image.
Since
4.4Declaration
Objective-C
- (void)setOkButtonImage:(UIImage *)image;Swift
func setOkButtonImage(_ image: UIImage!)Parameters
imageOK button image. OK button image cannot be nil.
-
Set OK button image opacity for corresponding UI state.
See
EMSecureInputUiControlStateSince
4.4Declaration
Objective-C
- (void)setOkButtonImageOpacity:(CGFloat)opacity forState:(EMSecureInputUiControlState)state;Swift
func setOkButtonImageOpacity(_ opacity: CGFloat, for state: EMSecureInputUiControlState)Parameters
opacityOK button image opacity. Allowed OK button image opacity is [0.0,1.0].
stateUI state. OK button image opacity for selected state is not supported.
-
Set Delete button image.
Since
4.4Declaration
Objective-C
- (void)setDeleteButtonImage:(UIImage *)image;Swift
func setDeleteButtonImage(_ image: UIImage!)Parameters
imageDelete button image. Delete button image cannot be nil.
-
Set Delete button image opacity for corresponding UI state.
See
EMSecureInputUiControlStateSince
4.4Declaration
Objective-C
- (void)setDeleteButtonImageOpacity:(CGFloat)opacity forState:(EMSecureInputUiControlState)state;Swift
func setDeleteButtonImageOpacity(_ opacity: CGFloat, for state: EMSecureInputUiControlState)Parameters
opacityDelete button image opacity. Allowed Delete button image opacity is [0.0,1.0].
stateUI state. Delete button image opacity for selected state is not supported.
-
Set Shift button image.
Since
6.0Declaration
Objective-C
- (void)setShiftButtonImage:(UIImage *)image;Swift
func setShiftButtonImage(_ image: UIImage!)Parameters
imageShift button image. Shift button image cannot be nil.
-
Set Shift button image opacity for corresponding UI state.
See
EMSecureInputUiControlStateSince
6.0Declaration
Objective-C
- (void)setShiftButtonImageOpacity:(CGFloat)opacity forState:(EMSecureInputUiControlState)state;Swift
func setShiftButtonImageOpacity(_ opacity: CGFloat, for state: EMSecureInputUiControlState)Parameters
opacityShift button image opacity. Allowed Shift button image opacity is [0.0,1.0].
stateUI state. Shift button image opacity for selected and disabled state are not supported.
-
Set the start and end color of the button gradient for corresponding control state.
Since
4.8Declaration
Objective-C
- (void)setButtonGradientColors:(UIColor *)startColor buttonGradientEndColor:(UIColor *)endColor forState:(EMSecureInputUiControlState)state;Swift
func setButtonGradientColors(_ startColor: UIColor!, buttonGradientEnd endColor: UIColor!, for state: EMSecureInputUiControlState)Parameters
startColorthe gradient start color.
endColorthe gradient end color.
statethe control state.
-
Set the start and end color of the OK button gradient for corresponding control state.
Since
4.8Declaration
Objective-C
- (void)setOkButtonGradientColors:(UIColor *)startColor buttonGradientEndColor:(UIColor *)endColor forState:(EMSecureInputUiControlState)state;Swift
func setOkButtonGradientColors(_ startColor: UIColor!, buttonGradientEnd endColor: UIColor!, for state: EMSecureInputUiControlState)Parameters
startColorthe gradient start color.
endColorthe gradient end color.
statethe control state.
-
Set the start and end color of the Delete button gradient for corresponding control state.
Since
4.8Declaration
Objective-C
- (void)setDeleteButtonGradientColors:(UIColor *)startColor buttonGradientEndColor:(UIColor *)endColor forState:(EMSecureInputUiControlState)state;Swift
func setDeleteButtonGradientColors(_ startColor: UIColor!, buttonGradientEnd endColor: UIColor!, for state: EMSecureInputUiControlState)Parameters
startColorthe gradient start color.
endColorthe gradient end color.
statethe control state.
-
Set the start and end color of the Shift button gradient for corresponding control state.
Since
6.0Declaration
Objective-C
- (void)setShiftButtonGradientColors:(UIColor *)startColor buttonGradientEndColor:(UIColor *)endColor forState:(EMSecureInputUiControlState)state;Swift
func setShiftButtonGradientColors(_ startColor: UIColor!, buttonGradientEnd endColor: UIColor!, for state: EMSecureInputUiControlState)Parameters
startColorthe gradient start color.
endColorthe gradient end color.
statethe control state. Shift button gradient color for disabled state is not supported.
-
Set OK button behavior. Minimum and maximum input length shall be identical for the following OK button behavior:
EMSecureInputUiOkButtonNoneandEMSecureInputUiOkButtonCustom.See
EMSecureInputUiOkButtonBehaviorSee
[EMSecureInputBuilder setMinimumInputLength:andMaximumInputLength:]Since
4.4Declaration
Objective-C
- (void)setOkButtonBehavior:(EMSecureInputUiOkButtonBehavior)behavior;Swift
func setOkButtonBehavior(_ behavior: EMSecureInputUiOkButtonBehavior)Parameters
behaviorOK button behavior.
-
Set delete button always enabled.
Since
4.6Declaration
Objective-C
- (void)setIsDeleteButtonAlwaysEnabled:(BOOL)isAlwaysEnabled;Swift
func setIsDeleteButtonAlwaysEnabled(_ isAlwaysEnabled: Bool)Parameters
isAlwaysEnabledto enable delete button irrespective of input.
-
Enabled or disable the OK button.
Since
5.0Declaration
Objective-C
- (void)setIsOkButtonDisabled:(BOOL)disabled;Swift
func setIsOkButtonDisabled(_ disabled: Bool)Parameters
disabledto disable the OK button or not.
-
Display or hide the delete button.
Since
5.0Declaration
Objective-C
- (void)setIsDeleteButtonVisible:(BOOL)visible;Swift
func setIsDeleteButtonVisible(_ visible: Bool)Parameters
visibleto set the delete button visible or not.
-
Display or hide the shift button.
Since
6.0Declaration
Objective-C
- (void)setIsShiftButtonVisible:(BOOL)visible;Swift
func setIsShiftButtonVisible(_ visible: Bool)Parameters
visibleto set the shift button visible or not.
-
Set the button visual effect.
Since
5.0Declaration
Objective-C
- (void)setButtonTouchVisualEffect: (EMButtonTouchVisualEffect)buttonTouchVisualEffect;Swift
func setButtonTouchVisualEffect(_ buttonTouchVisualEffect: EMButtonTouchVisualEffect)Parameters
buttonTouchVisualEffectThe visual effect.
-
Set the visual effect parameters after setting
setButtonTouchVisualEffect.Since
5.0Declaration
Objective-C
- (void)setRippleEffectParameters:(UIColor *)color duration:(long)milliseconds;Swift
func setRippleEffectParameters(_ color: UIColor!, duration milliseconds: Int)Parameters
colorThe color of the touch button visual effect.
millisecondsThe duration in milliseconds.
-
API to enable the accessibility
Since
6.2Declaration
Objective-C
- (void)setAccessibilityEnabled:(BOOL)isEnabled;Swift
func setAccessibilityEnabled(_ isEnabled: Bool)Parameters
isEnabledwhen the accessibility is set then the keypad view will be ready for accessibility features which is enabled from system settings. The default value for the API is NO
-
The accessibility label for the OK button
Since
6.2Declaration
Objective-C
- (void)setOkButtonAccessibilityLabel:(NSString *)text;Swift
func setOkButtonAccessibilityLabel(_ text: String!)Parameters
textlocalized string that identifies the OK button in the keypad. The default value for the property is “OK” @exception NSInvalidArgumentException An exception will be thrown if this property is set to nil
-
The accessibility label for the delete button
Since
6.2Declaration
Objective-C
- (void)setDeleteButtonAccessibilityLabel:(NSString *)text;Swift
func setDeleteButtonAccessibilityLabel(_ text: String!)Parameters
textlocalized string that identifies the delete button in the keypad. The default value for the property is “Delete” @exception NSInvalidArgumentException An exception will be thrown if this property is set to nil
-
The accessibility label for the shift button
Since
6.2Declaration
Objective-C
- (void)setShiftButtonAccessibilityLabel:(NSString *)text;Swift
func setShiftButtonAccessibilityLabel(_ text: String!)Parameters
texta localized string that identifies the shift button in the keypad. The default value for the property is “Shift” @exception NSInvalidArgumentException An exception will be thrown if this property is set to nil
-
The accessibility label for the first label
Since
6.2Declaration
Objective-C
- (void)setFirstAccessibilityLabel:(NSString *)text;Swift
func setFirstAccessibilityLabel(_ text: String!)Parameters
textlocalized string that identifies the first text field. The default value for the property is “Secure text field” @exception NSInvalidArgumentException An exception will be thrown if this property is set to nil
-
The accessibility hint for the first input text field
- For example if text field contains five characters, in VoiceOver it is read out as “Five characters”. “characters” word is from this property and number of characters populated internally. @exception NSInvalidArgumentException An exception will be thrown if this property is set to nil
Since
6.2Declaration
Objective-C
- (void)setFirstInputFieldAccessibilityHint:(NSString *)text;Swift
func setFirstInputFieldAccessibilityHint(_ text: String!)Parameters
textlocalized string that contains the brief description of the first text field content. The default value for the property is “Characters”
-
The accessibility label for the second label
Declaration
Objective-C
- (void)setSecondAccessibilityLabel:(NSString *)text;Swift
func setSecondAccessibilityLabel(_ text: String!)Parameters
textlocalized string that identifies the confirmation text field. The default value for the property is “Secure confirmation text field” @exception NSInvalidArgumentException An exception will be thrown if this property is set to nil @since 6.2
-
The accessibility hint for the second input text field
- For example if confirmation text field contains five characters, in VoiceOver it is read out as “Five characters”. “characters” word is from this property and number of characters populated internally. @exception NSInvalidArgumentException An exception will be thrown if this property is set to nil
Since
6.2Declaration
Objective-C
- (void)setSecondInputFieldAccessibilityHint:(NSString *)text;Swift
func setSecondInputFieldAccessibilityHint(_ text: String!)Parameters
textlocalized string that contains the brief description of the confirmation text field content. The default value for the property is “Characters”
EMSecureInputBuilder Protocol Reference