serralvo / textfieldcounter Goto Github PK
View Code? Open in Web Editor NEWUITextField character counter with lovable UX π. No math skills required π.
License: MIT License
UITextField character counter with lovable UX π. No math skills required π.
License: MIT License
Now our tests is not using a good naming spec, IMO we should update that.
Good referente to follow: https://qualitycoding.org/unit-test-names/
θΎε ₯δΈζζΆιεΆε符ζ ζοΌε―δ»₯ζ ιθΎε ₯οΌit's a bug
If I set the UITextFieldDelegate
in my own ViewController, the TextFieldCounter class doesn't get any delegate callbacks from UITextFieldDelegate
and so it doesn't work anymore.
Is it possible to support both delegates?
Before #12
Update read-me to show new features.
Features
listIt seems the version in the cocoapods repo is outdated, as the class is not open
.
This causes that when importing the module, the class can't actually be used.
Would be great to fix it!! In the meantime I'll work against the repo master branch.
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.
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 idea is provide a way to show the information about limits in an external label, by default, we keep using internal label (as right view).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.