gcamp / gcplaceholdertextview Goto Github PK
View Code? Open in Web Editor NEWA subclass of UITextView that allow a placeholder
Home Page: gcamp.ca
License: Other
A subclass of UITextView that allow a placeholder
Home Page: gcamp.ca
License: Other
I tried to use the NSNotificationTextViewDidChange ,if the text is equal to @"" or is nil, I will set the text to
placeholder.But that does't work. the placeholder become the text,so that I have to delete it before I input something.
If someone enter the same placeholder text in the text view, it is removed when beginEditing is called which is not an expected result.
Greetings!
Is it possible to specify a different font for the placeholder? Would you like a PR for this? What should the API be?
Please update cocoapod's version.
There is a critical bug, so have to update latest version of GCPlaceholderTextView
I love this pods. Nice job! and Thanks
Seems to placeholder color is incomplete implementation.
I try to set placeholder color and compile, first look is correct. Placeholder color set to be black after editing and came back main view.
I have been using this for placeholder text but I'm now using a custom NSTextContainer
with one of my UITextView
s and the placeholder becomes real text.
I see that somebody has already added GCPlaceholderTextView
to the CocoaPods package manager repo.
CocoaPods is a tool for managing dependencies for OS X and iOS Xcode projects and provides a central repository for iOS/OS X libraries. This makes adding libraries to a project and updating them extremely easy and it will help users to resolve dependencies of the libraries they use.
However, GCPlaceholderTextView
doesn't have any version tags. The current HEAD commit has been added as version 0.0.1, but a version tag will make dependency resolution much easier.
Semantic version tags (instead of plain commit hashes/revisions) allow for resolution of cross-dependencies.
In case you didn’t know this yet; you can tag the current HEAD as, for instance, version 1.0.0, like so:
$ git tag -a 1.0.0 -m "Tag release 1.0.0"
$ git push --tags
@gcamp Can you add a condition if character length is 0 then it should show Place Holder with blinking cursor.
There is a bug in this code that happens when loading the text view and setting both the placeholder text and text properties. This scenario causes the text to show up as light gray. This is because the setting of text color only occurs on begin/end editing. You should also override the setText in order to handle the colors appropriately. Here is the fix that I did.
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.