You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a matter of taste, but if I were going to use TextFieldCounter (I'm not, currently), I'd prefer a block for handling when max length is reached.
textField.onMaxLengthCrossed { overLimit in
submitButton.isEnabled = !overLimit
}
I don't love onMaxLengthCrossed as a name, but I couldn't think of anything better right away, so if you decide to add a block handler, maybe you can think of a better name.
On that note, it seems important to have a notification on the delegate if the max limit is "unreached" as well -- for instance in the block above, to re-enable the submit button.
The text was updated successfully, but these errors were encountered:
Hey,
It's a matter of taste, but if I were going to use TextFieldCounter (I'm not, currently), I'd prefer a block for handling when max length is reached.
I don't love
onMaxLengthCrossed
as a name, but I couldn't think of anything better right away, so if you decide to add a block handler, maybe you can think of a better name.On that note, it seems important to have a notification on the delegate if the max limit is "unreached" as well -- for instance in the block above, to re-enable the submit button.
The text was updated successfully, but these errors were encountered: