ruslanskorb / rskgrowingtextview Goto Github PK
View Code? Open in Web Editor NEWA light-weight UITextView subclass that automatically grows and shrinks.
License: Apache License 2.0
A light-weight UITextView subclass that automatically grows and shrinks.
License: Apache License 2.0
This warning appears in new projects with a minimum supported version of iOS 15, Apple also offers the new TextKit2, is it possible to do something to make it support TextKit2
UITextView 5,578,465,280 is switching to TextKit 1 compatibility mode because its layoutManager was accessed. Break on void _UITextViewEnablingCompatibilityMode(UITextView *__strong, BOOL) to debug.
If you set the textContainerInsets to have a different top and bottom inset, descenders will be clipped on the placeholder text.
Here are the settings to use:
self.growingTextView.font = UIFont.systemFontOfSize(14, weight: UIFontWeightRegular)
self.growingTextView.textContainerInset = UIEdgeInsets(top: 21, left: 10, bottom: 18, right: 10)
Create a new line, then tap in any line above that new line, paste the contents on the UITextView. The constraints break instantly.
Hi,
At WWDC23 Apple announced that apps and SDKs that make use of "required reason" APIs and "Data Collection", "Tracking" will need to provide a privacy manifest.
Does RSKGrowingTextView need to include this manifest?
https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests
https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api
The textView is not resizing itself. I have tried using inputTextView.superview?.layoutIfNeeded()
for forcing it to update height but it isn't.
Please let me know if something wrong with the usage or declaration. thanks! @ruslanskorb
Calculate height function returns wrong height because of wrong textView size because view with autoLayout have incorrect size in viewDidLoad
App crashing on ios 13 Xcode 11.2
-[NSURL init] called; this results in an NSURL instance with an empty URL string. Please use one of the documented NSURL initialization methods instead (initWithString:, initFileURLWithPath:, etc.). This message shown only once.
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UITextLayoutView because no class named _UITextLayoutView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)'
If I set the text programatically it doesnt change the constraints. Maybe you can trigger the height change on didSet
of text
Hi,
I have added the TextView Programmatically. None of the delegate methods are called. Is there any other way to get the delegate callbacks in Objective-C ?
Here is the code
self.containerView = [[UIView alloc] initWithFrame:CGRectMake(0,screenHeight-155, screenWidth, 40)];
self.grTextView = [[RSKGrowingTextView alloc] initWithFrame:CGRectMake(45, 0, screenWidth-100, 40)];
self.grTextView.minimumNumberOfLines = 1;
self.grTextView.maximumNumberOfLines = 4;
self.grTextView.delegate = self;
self.grTextView.placeholder = NSLocalizedString(@"write_comment", nil);
self.grTextView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self.view addSubview:self.containerView];
[self.view bringSubviewToFront:self.containerView];
[self.containerView addSubview:self.grTextView];
And the delegate callback method. I have added breakpoint but it's not calling
- (void)growingTextView:(RSKGrowingTextView * _Nonnull)textView willChangeHeightFrom:(CGFloat)growingTextViewHeightBegin to:(CGFloat)growingTextViewHeightEnd {
float diff = (textView.frame.size.height - growingTextViewHeightEnd);
CGRect r = self.containerView.frame;
r.size.height -= diff;
r.origin.y += diff;
self.containerView.frame = r;
}
HI!
I got this error in xcode: Profile.storyboard: error: "IB Designables: Failed to render and update auto layout status dlopen(RSKGrowingTextView.framework, 1): Library not loaded: @rpath/RSKPlaceholderTextView.framework/RSKPlaceholderTextView Referenced from: RSKGrowingTextView.framework Reason: image not found"
It's repeats in different projects. After this error showed my storyboard stay invisible..... Fix it pls!
version 5.0.1
I opened a issue about placeholder in RSKPlaceholderTextView. I have some misstakes.
It is problem with RSKGrowingTextView.
My placeholder is 2 row. Ex: "Nhap noi dung nhan xet o day. Toi thieu 50 ki tu."
When i wrote 2 row and remove all, my placeholder display 1 row.
It is not expanding if we add in
UICollectionViewController inputAccessoryView
kindly help me as soon as possible
Hi
Hope you will be good
when I put RSKTV inside a container
and container is the input accessory view of UICollectionVIew
in that case it is not expanding
what could be reason?
I put In viewDidLoad
self.growingTextView.translatesAutoresizingMaskIntoConstraints = false
See the picture
I need something like that
I made the IBOutlet of this whole container and this is the inputaccessoryview
please guide
Thanks
I had used RSKGrowingTextView in my project as a chat or comment TextView.
In this project, I am using IQKeyboardManager
//MARK:- IQKeyboardManager IQKeyboardManager.shared.enable = true IQKeyboardManager.shared.shouldShowToolbarPlaceholder = false IQKeyboardManager.shared.shouldResignOnTouchOutside = true IQKeyboardManager.shared.disabledToolbarClasses = [CommentsTabVC.self]
And I had disabled the toolbar to remove the done button.
In my case when clicking on anyplace in the screen the keyboard resigned its first responder and the view goes down again. But when clicking on the textView indicator it makes weird behavior.
I had tried to override the tap gesture by adding the below code:
@IBOutlet weak var commentTextView: RSKGrowingTextView! commentTextView.addTapGesture { if self.commentTextView.isFirstResponder{ self.commentTextView.resignFirstResponder() }else{ self.commentTextView.becomeFirstResponder() } }
I’m working on Swift 2.3 using RSKGrowingTextView 1.2.0. I can’t seem to import RSKKeyboardAnimationObserver
in my ViewController. Neither can I find the methods rsk_subscribeKeyboardWithBeforeWillShowOrHideAnimation
and rsk_subscribeKeyboardWithWillChangeFrameAnimation
to implement. What do I do?
Hi,
I am using this class within a UITableViewCell. Problem is it's not expanding or height is not changing after 3 lines. And TableView's cell height also does not change when I am entering texts. Any hint on how to solve it ?
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.