IPhone UITextView leaves room for two lines below

When I start typing in the default text element in my view manager, it doesn't fit the bottom of the text box. It leaves room for two more lines of text, and then starts scrolling. I want it to start scrolling when I start moving beyond the last line.

I tried everything and I don’t know what can I do? Any ideas?

+1
source share
4 answers

since UITextView is a subclass of UIScrollView, look at UIScrollView properties like contentInset and others to see if they can create a gap between your frame / borders and the contents inside.

+1
source

, mahboudz. , , , :

    UIEdgeInsets contentInset = notes.contentInset;
    contentInset.bottom = 10.0;
    notes.contentInset = contentInset;

- UITextView.

+1

, mahboudz Aaron, , UITextView contentInset , textView:shouldChangeTextInRange:replacementText: UITextViewDelegate

textView.contentInset = UIEdgeInsetsMake(0, 0, 5, 0);
+1

- , , . , UITextView 32 , , , . , ContentInset, :

textView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
0

All Articles