Inherits from UITextField
Conforms to UITextFieldDelegate
Declared in JOECurrencyTextField.h

Overview

JOECurrencyTextField is a subclass of UITextField that specifically deals with the entry and formatting of currency.

Tasks

Properties

  •   formatter

    The formatter converts NSNumbers into autoupdating localized currency related strings.

    property
  •   decimalValue

    The number value of the currency string.

    property
  •   activeOffset

    The number of active significant digits allowed to change in every call of the text fields delegate methods.

    property
  •   usesArbitraryFractionDigits

    Allows the user to set an arbitrary number of digits after the decimal seperator by pressing the seperator on the keypad.

    property

Creating JOECurrencyTextField

Dismissing the keyboard

Properties

activeOffset

The number of active significant digits allowed to change in every call of the text fields delegate methods.

@property (nonatomic, assign) NSUInteger activeOffset

Discussion

Example: $0.4523 : the activeOffset is equal to 1. If equal to 2, $0.0452.

Declared In

JOECurrencyTextField.h

decimalValue

The number value of the currency string.

@property (nonatomic, strong, readonly) NSDecimalNumber *decimalValue

Declared In

JOECurrencyTextField.h

formatter

The formatter converts NSNumbers into autoupdating localized currency related strings.

@property (nonatomic, strong) NSNumberFormatter *formatter

Declared In

JOECurrencyTextField.h

usesArbitraryFractionDigits

Allows the user to set an arbitrary number of digits after the decimal seperator by pressing the seperator on the keypad.

@property (nonatomic, assign) BOOL usesArbitraryFractionDigits

Declared In

JOECurrencyTextField.h

Instance Methods

dismissKeyboard:

This method resigns the first responder, dismissing the keyboard.

- (IBAction)dismissKeyboard:(id)sender

Parameters

sender

The object that is sending the action message.

Declared In

JOECurrencyTextField.h

initWithFrame:

The designated initializer when using code.

- (instancetype)initWithFrame:(CGRect)frame

Parameters

frame

Used to size and position the control.

Return Value

Returns a JCCurrencyTextField object.

Declared In

JOECurrencyTextField.h