All Products
Search
Document Center

Mobile Platform as a Service:Amount input box

Last Updated:Jul 18, 2023

AUAmountInputBox, composed of AUAmountInputField and AUAmountInputFieldFooterView, is an amount input box with the combination function.

AUAmountInputBox

  • Currently, it allows you to set titles (plain text) and add footers (plain text/input box).

  • Input content verification and preprocessing logic is not contained, but can be realized by setting delegate in the business.

API description

NS_ASSUME_NONNULL_BEGIN

/**
The amount input box with the combination function.
Currently, it allows you to set titles (plain text) and add footers (plain text/input box).
Input content verification and preprocessing logic is not contained, but can be realized by setting delegate in the business.
*/
@interface AUAmountInputBox : UIView

/**
 AUAmountInputBox initialization method

 @param views @[AUAmountInputField,AUAmountInputFieldFooterView]
 @return AUAmountInputBox
 */
+ (AUAmountInputBox *)amountInputBoxWithViews:(NSArray *) views;

@end

NS_ASSUME_NONNULL_END

Sample code

AUAmountInputField *inputField = [AUAmountInputField amountInputWithTitle:@"Transfer amount"];
AUAmountInputFieldFooterView *footerView = [AUAmountInputFieldFooterView footerWithInput:@"Add notes (within 50 words)"];
AUAmountInputBox *inputBox = [AUAmountInputBox amountInputBoxWithViews:[NSArray arrayWithObjects:inputField,footerView,nil]];
inputField.textField.delegate = self;
footerView.inputTextField.delegate = self;
[_scrollView addSubview:inputBox];


AUAmountInputField

It is extended based on the AUAmountEditText combination. Currently, it supports title setting.

API description

NS_ASSUME_NONNULL_BEGIN


/**
 It is extended based on the AUAmountEditText combination. Currently, it supports title setting.
 */
@interface AUAmountInputField : UIView

- (AUAmountEditTextField *)textField;

+ (AUAmountInputField *)amountInputWithTitle:(NSString *) title;

@end

NS_ASSUME_NONNULL_END

Code sample

See Code sample of AUAmountInputBox.


AUAmountInputFieldFooterView

Description

AUAmountInputFieldFooterView is footerView of AUAmountInputBox, and currently supports both “plain text” and “input box” .

Dependency

The dependency of AUAmountInputFieldFooterView is as follows:

pod 'AntUI'

API description

NS_ASSUME_NONNULL_BEGIN

@interface AUAmountInputFieldFooterView : UIView

@property (nonatomic, strong) UITextField * inputTextField;
@property (nonatomic, strong) UILabel * descTextLabel;

+ (AUAmountInputFieldFooterView *)footerWithInput:(nullable NSString *)placeholder;
+ (AUAmountInputFieldFooterView *)footerWithDesc:(nullable NSString *)text;

@end

NS_ASSUME_NONNULL_END

Sample code

See Code sample of AUAmountInputBox.