antol / apautocompletetextfield Goto Github PK
View Code? Open in Web Editor NEWAutocomplete text field. It works like Safari (iOS) or Chrome (iOS) search / address bar
License: MIT License
Autocomplete text field. It works like Safari (iOS) or Chrome (iOS) search / address bar
License: MIT License
There is a little bug when I trying to type first letter from the phrase. For example, if my first character will be 'a' - there will be:
APAutocompleteTextFieldExample[1487:70b]
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'Wrong completion string'
So, I have modified your code (just a little) by adding one condition to autocompleteTextField:complitedStringForOriginString in APViewController.m:
if ((originStringRange.location == NSNotFound) || (originStringRange.location != 0) ) {
complitedString = nil;
}
Was looking for how to do autocomplete and came across your class and thought I would give it a try.
The example wouldn't build as there's some references to files that don't have "Example" in the name.
The class assumes you'll be creating a text field programmatically and during the init of the rectangle the selectionColor is specified. In my view I placed a textview in the storyboard so I had to specify the selectionColor in my viewDidLoad in order for it to work.
Thanks!
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.