     /// The duration of the animation while resizing the text view in seconds. Defaults to `0.1`.
     public var resizeDuration: TimeInterval = 0.1
     
-    private var heightConstraint: NSLayoutConstraint!
+    /// The maximum height that the text view should resize to.
+    ///
+    /// Once the `frame`'s height has reached this value,
+    /// `showsVerticalScrollIndicator` and `isScrollEnabled` are set to `true`.
+    ///
+    /// Once the `frame`'s height is below this value,
+    /// `showsVerticalScrollIndicator` and `isScrollEnabled` are set back to their previous values.
+    ///
+    /// The defualt value is `ResizableHeight.infinite`
+    public var maxResizableHeight: ResizableHeight = .infinite
     
-    private var maxHeight: CGFloat?
-    
-    public var resizeForNumberOfLines: Int = 0 {
-        didSet {
-            guard resizeForNumberOfLines > 0 else { return (maxHeight = nil) }
-            let padding = (textContainer.lineFragmentPadding * 2) + textContainerInset.top + textContainerInset.bottom
-            maxHeight = (font!.lineHeight * CGFloat(resizeForNumberOfLines)) + padding
-        }
-    }
+    /// The minimum height that the text view should resize to.
+    ///
+    /// The defualt value is `ResizableHeight.numberOfLines(1)`
+    public var minResizableHeight: ResizableHeight = .numberOfLines(1)
     
     /// This closure will be called before the text view's `height` is changed.
     /// The parameter is the height that the text view will be updated to as a `CGFloat`.

    
    private func updateHeightConstraint(_ newHeight: CGFloat) {
        willChangeHeight?(newHeight)
        UIView.animate(withDuration: resizeDuration,
                       delay: 0,
                       options: .layoutSubviews,
                       animations: { self.heightConstraint.constant = newHeight },
                       completion: { [weak self] _ in
                        self?.didChangeHeight?(newHeight)
        })
    }
    
}

    /// This closure will be called after the text view's `height` is changed.
    /// The parameter is the height that the text view was updated to as a `CGFloat`.
    public var didChangeHeight: ((CGFloat) -> Void)?
    
    // MARK: Private Properties
    
    private var heightConstraint: NSLayoutConstraint!
    
    private var initialIsScrollEnabled: Bool = true
    private var initialShowsVerticalScrollIndicator: Bool = true
    
    private var maxHeight: CGFloat? {
        return calculateHeight(for: maxResizableHeight)
    }
    
    private var minHeight: CGFloat? {
        return calculateHeight(for: minResizableHeight)
    }
    
    private var isMaxHeight: Bool = false {
        didSet {
            if !oldValue {
                initialIsScrollEnabled = isScrollEnabled
                initialShowsVerticalScrollIndicator = showsVerticalScrollIndicator
            }
            isScrollEnabled = isMaxHeight ? true : initialIsScrollEnabled
            showsVerticalScrollIndicator = isMaxHeight ? true : initialShowsVerticalScrollIndicator
        }
    }
    
    /*
     *  MARK: - Object Lifecycle
