GrowingTextView alternatives and similar libraries
Based on the "UI" category.
Alternatively, view GrowingTextView alternatives based on common mentions on social networks and blogs.
-
Animated Tab Bar
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion -
JTAppleCalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable -
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders. -
Alerts Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
Pagemenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
Scrollable-GraphView
An adaptive scrollable graph view for iOS to visualise simple discrete datasets. Written in Swift. -
ESTabBarController
:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie! -
Material Components for iOS
[In maintenance mode] Modular and customizable Material Design UI components for iOS -
NotificationBanner
The easiest way to display highly customizable in app notification banners in iOS -
ActiveLabel
UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift -
SlideMenuControllerSwift
iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift. -
PopupDialog
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style. -
TLYShyNavBar
DISCONTINUED. Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars! -
StarWars.iOS
This component implements transition animation to crumble view-controller into tiny pieces. -
KMNavigationBarTransition
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically. -
Whisper
:mega: Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside -
PaperOnboarding
:octocat: PaperOnboarding is a material design UI slider. Swift UI library by @Ramotion -
CircleMenu
:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion -
RazzleDazzle
A simple keyframe-based animation framework for iOS, written in Swift. Perfect for scrolling app intros.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of GrowingTextView or a related project?
README
GrowingTextView
Requirements
iOS 8.0 or above
Installation
CocoaPods
GrowingTextView is available through CocoaPods. To install it, simply add the following line to your Podfile:
Swift 5.0
pod 'GrowingTextView', '0.7.2'
Swift 4.2
pod 'GrowingTextView', '0.6.1'
Swift 4.1
pod 'GrowingTextView', '~> 0.5'
Swift 3
pod 'GrowingTextView', '~> 0.4'
Swift 2.3 (Stopped update since Sep 2016)
pod 'GrowingTextView', :git => 'https://github.com/KennethTsang/GrowingTextView.git', :branch => 'swift2'
Carthage
GrowingTextView is also available through Carthage. To install it, add the following line to your Cartfile:
Swift 5.0
github "KennethTsang/GrowingTextView" ~> 0.7
Swift 4.2
github "KennethTsang/GrowingTextView" ~> 0.6
Swift 4.1
github "KennethTsang/GrowingTextView" ~> 0.5
Swift 3
github "KennethTsang/GrowingTextView" ~> 0.4
Swift 2.3 (Stopped update since Sep 2016)
github "KennethTsang/GrowingTextView" "swift2"
Manually
Copy GrowingTextView.swift
into your project.
Usage
Example
GrowingTextview is just a textview, download the example to see how to use it as a input toolbar like other instant messaging apps.
Using GrowingTextview programmatically
let textView = GrowingTextView()
textView.delegate = self
addSubview(textView)
Using GrowingTextview in Storyboard
- Drag a TextView into Storyboard.
- Set class to "GrowingTextView".
- Set delegate to it's view controller.
automaticallyAdjustsScrollViewInsets
Sometime the view controller may incorrectly adjust the inset of textview automatically. To avoid this, set automaticallyAdjustsScrollViewInsets
to false
override func viewDidLoad() {
super.viewDidLoad()
automaticallyAdjustsScrollViewInsets = false
}
Customization
Parameter | Type | Description | Default |
---|---|---|---|
maxLength | Int | Maximum text length. Exceeded text will be trimmed. 0 means no limit. | 0 |
trimWhiteSpaceWhenEndEditing | Bool | Trim white space and new line characters when textview did end editing. | true |
placeholder | String? | Placeholder text. | nil |
placeholderColor | UIColor | Placeholder text color. | UIColor(white: 0.8, alpha: 1.0) |
attributedPlaceholder | NSAttributedString? | Attributed Placeholder text. | nil |
minHeight | CGFloat | Minimum height of textview. | 0.0 |
maxHeight | CGFloat | Maximum height of textview. | 0.0 |
Examples
textView.maxLength = 140
textView.trimWhiteSpaceWhenEndEditing = false
textView.placeholder = "Say something..."
textView.placeholderColor = UIColor(white: 0.8, alpha: 1.0)
textView.minHeight = 25.0
textView.maxHeight = 70.0
textView.backgroundColor = UIColor.whiteColor()
textView.layer.cornerRadius = 4.0
Animation
- Adopt
GrowingTextViewDelegate
instead of UITextViewDelegate. - Implement textViewDidChangeHeight.
- Call layoutIfNeeded() on superview inside the animation.
class ViewController: UIViewController, GrowingTextViewDelegate {
func textViewDidChangeHeight(_ textView: GrowingTextView, height: CGFloat) {
UIView.animate(withDuration: 0.2) {
self.view.layoutIfNeeded()
}
}
}
Delegate
GrowingTextViewDelegate
is inherited from UITextViewDelegate. You may use it's delegate function as a normal UITextView.
class ViewController: UIViewController, GrowingTextViewDelegate {
func textViewDidChange(_ textView: UITextView) {
...
}
func textViewDidEndEditing(_ textView: UITextView) {
...
}
}
Check out UITextViewDelegate here: https://developer.apple.com/reference/uikit/uitextviewdelegate
Author
Kenneth Tsang, [email protected]
License
GrowingTextView is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the GrowingTextView README section above
are relevant to that project's source code only.