IOS 7 UITextView Error

I noticed that in iOS 7, the last line UITextViewafter reaching the bottom is always hidden. This even happens in the Calendar app when you add a note to an event.

I tried setting the contentInsets and textContainerInset, none of them mattered.

Has anyone else experienced this problem, and if so, a workaround?

Calendar UITextView Bug

+4
source share
3 answers

I have an alternative solution to solve the problem:

  • Contribute TextViewDelegateto ViewController.
  • Set the delegate to selffor textView.
  • Implement textView:(UITextView *)textView shouldChangeTextInRange:.

Example:

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
    [textView scrollRangeToVisible:range];

    return YES;
}

. , '\n' (Enter), , , .

+2

I solve this problem for my application.

The problem arises when you change the color of the text while you control the first responder.

The color must be before it is the first responder.

-1
source

All Articles