Input Mask v5.0.0 Release Notes

Release Date: 2019-09-18 // about 2 years 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
    textInput(:isChangingCharactersIn:replacementString:) or

    ➕ 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.