hsusmita / growingtextviewhandler-objc Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
According to current usage, client code needs to call - (void)resizeTextViewWithAnimation:(BOOL)animated in the UITextViewDelegate method - (void)textViewDidChange:(UITextView *)textView. But this delegate method is not invoked when text is set programmatically. There should be a way to resize textview when text is set
For deployment target 8.3, there is unwanted top content inset for the UITextView. This problem disappears if the UIViewController property automaticallyAdjustsScrollViewInsets is set to NO. There is a need of another solution which is independent of any external property.
Can you please add a property or a delegate which should call/update each time when there's an updated frame for a text view.
Hi there, first of all, thank you so much this awesome thing. I found it easy to use and setup (if you're using AutoLayout & StoryBoard). However, in my app, I'm not having a storyboard (or XIBs ) and AutoLayout at all. However to use this handler, I need to pass constraints. How can I use without passing it?
In this method, - (id)initWithTextView:(UITextView *)textView withHeightConstraint:(NSLayoutConstraint *)heightConstraint
, if I pass nil for heightConstraint
then it'll stop growing.
Is it possible, even if not, then just give me an idea so that I can achieve this on my self.
Thanks!
Great library! A suggestion:
If you respond to UITextViewTextDidChangeNotification inside GrowingTextViewHandler, you won't even need to deal with the textViewDelegate. Makes it even easier/faster to set up
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(resizeTextViewWithAnimation:)
name:UITextViewTextDidChangeNotification
object:self.growingTextView];
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.