All Products
Search
Document Center

Amount input box

Last Updated: May 25, 2021

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.

Sample image

API description

 
  1. NS_ASSUME_NONNULL_BEGIN
  2. /**
  3. The amount input box with the combination function.
  4. Currently, it allows you to set titles (plain text) and add footers (plain text/input box).
  5. Input content verification and preprocessing logic is not contained, but can be realized by setting delegate in the business.
  6. */
  7. @interface AUAmountInputBox : UIView
  8. /**
  9. AUAmountInputBox initialization method
  10. @param views @[AUAmountInputField,AUAmountInputFieldFooterView]
  11. @return AUAmountInputBox
  12. */
  13. + (AUAmountInputBox *)amountInputBoxWithViews:(NSArray *) views;
  14. @end
  15. NS_ASSUME_NONNULL_END

Sample code

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




AUAmountInputField

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

Sample image

API description

 
  1. NS_ASSUME_NONNULL_BEGIN
  2. /**
  3. It is extended based on the AUAmountEditText combination. Currently, it supports title setting.
  4. */
  5. @interface AUAmountInputField : UIView
  6. - (AUAmountEditTextField *)textField;
  7. + (AUAmountInputField *)amountInputWithTitle:(NSString *) title;
  8. @end
  9. 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” .

Sample image

Dependency

The dependency of AUAmountInputFieldFooterView is as follows:

 
  1. pod 'AntUI'

API description

 
  1. NS_ASSUME_NONNULL_BEGIN
  2. @interface AUAmountInputFieldFooterView : UIView
  3. @property (nonatomic, strong) UITextField * inputTextField;
  4. @property (nonatomic, strong) UILabel * descTextLabel;
  5. + (AUAmountInputFieldFooterView *)footerWithInput:(nullable NSString *)placeholder;
  6. + (AUAmountInputFieldFooterView *)footerWithDesc:(nullable NSString *)text;
  7. @end
  8. NS_ASSUME_NONNULL_END

Sample code

See Code sample of AUAmountInputBox.