title: Move UITextView caret to new line when user enter 29 character?
body: <p>i want only 3 lines in UITextView. And each line will have maximum 29 characters </p>
  
  <p>What i did is </p>
  
  <pre><code> static const NSUInteger MAX_NUMBER_OF_LINES_ALLOWED = 3;
  
          NSMutableString *t = [NSMutableString stringWithString: self.addressTextView.text];
          [t replaceCharactersInRange: range withString: text];
  
          NSUInteger numberOfLines = 0;
          for (NSUInteger i = 0; i &lt; t.length; i++) {
              if ([[NSCharacterSet newlineCharacterSet] characterIsMember: [t characterAtIndex: i]]) {
                  numberOfLines++;
              }
          }
  
          return (numberOfLines &lt; MAX_NUMBER_OF_LINES_ALLOWED);
  </code></pre>
  
  <p>In below delegate method</p>
  
  <pre><code>- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
  </code></pre>
  
  <p>Please let me know that how i can restrict length of each line to max 29 characters.</p>
  
  <p>That is if user type 29 characters in first line then take him to newline.</p>
  
  <p>Thanks in Advance.</p>