I have a unusual problem. First i have Nav Controller and as a one page i have view controller with top panel for back button. I added uiview and uitextview on it. Then i make all needed constraints and after run and see top padding for text in textview about ~60 px . And i dont really know how to remove it.
I tried:
textViewUserInput.contentInset = UIEdgeInsetsMake(-50, 5, 5, 5);
it works but value -50 for top inset is not good for different devices and orientation
I also tried:
textViewUserInput.textContainerInset = UIEdgeInsetsZero;
textViewUserInput.textContainer.lineFragmentPadding = 0;
doesn't change anything
In Main.storyboard, select your view controller the one that has the UITextView in and underneath your attributes inspector tab uncheck "Adjust scroll view insets". I had the same problem and that worked for me.
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