Input Mask v5.0.0 Release Notes

Release Date: 2019-09-18 // 4 months ago
  • ✂ Removed:

    • CaretStringIterator::beforeCaret()

    This method is now replaced with ::insertionAffectsCaret() and ::deletionAffectsCaret() calls.

    • ::deleteText() and ::modifyText() in MaskedTextFieldDelegate, MaskedTextInputListener and MaskedTextViewDelegate

    ♻️ These methods had been refactored and merged.

    Please, consider overriding corresponding
    textField(:shouldChangeCharactersIn:replacementString:)
    textInput(:isChangingCharactersIn:replacementString:) or
    textView(:shouldChangeTextIn:replacementText:)
    instead.

    ➕ Added:

    • CaretString instances now contain caret gravity.

    🚚 Caret gravity affects caret movement when Mask adds characters precisely at the caret position during formatting. It is important to retain caret position after text deletion/backspacing.

    0️⃣ Default CaretGravity is .forward. Set caret gravity to .backward only when user hits backspace.

    • CaretStringIterator::insertionAffectsCaret() and CaretStringIterator::deletionAffectsCaret()

    These methods allow to incorporate new caret gravity setting. RTLCaretStringIterator had also been rewritten to reflect these changes.

    Modified:


Previous changes from v4.3.0

  • ➕ Added:

    • AffinityCalculationStrategy.extractedValueCapacity option allowing to have radically different mask format depending on the extracted value length