I need to restrict my textview to only 6 lines. How do I limit my textview to 6 lines? I have put some character limit of 50 characters anyways.
That is rarely simple to achieve. Try out following code
inputTextView.textContainer.maximumNumberOfLines = 6
inputTextView.textContainer.lineBreakMode = .ByWordWrapping
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With