title: How to move/jump the cursor next line to the image view after inserting image with in the text view
body: <p>I have inserted an image from the library in the text view using the image picker,</p>
  
  <p>In pickeDelegate <strong><code>didFinishPickingImage</code></strong> method</p>
  
  <pre><code>imgview = [[UIImageView alloc] initWithImage:image];
  
              NSString *messageText = [[NSString alloc]init];
              messageText = messageView.text;
              CGSize s = [messageText sizeWithFont:[UIFont systemFontOfSize:15] //define your textview font size
                                 constrainedToSize:CGSizeMake(self.view.bounds.size.width - 40, MAXFLOAT)  //                                      lineBreakMode:UILineBreakModeWordWrap];   
              CGRect frame = CGRectMake(0.0f, s.height+10, 50, 50);//use YourImageView. height and width 
              imgview.frame=frame;
  
              //[imgview setFrame:CGRectMake(0, 0, 30,30) ];
              [messageView addSubview:imgview];
  </code></pre>
  
  <p>And implemented logic to add image at the end of the last text using followin delegate method logic</p>
  
  <pre><code>- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
  {
        if ( [text isEqualToString:@"\n"] ) {
  
        }
        else
        {
              NSString *yourstring = [[NSString alloc]init];
              yourstring = textView.text;
              CGSize s = [yourstring sizeWithFont:[UIFont systemFontOfSize:15] //define your textview font size
                                constrainedToSize:CGSizeMake(self.view.bounds.size.width - 40, MAXFLOAT)  // - 40 For cell padding
                                    lineBreakMode:UILineBreakModeWordWrap];   
              CGRect frame = CGRectMake(0.0f, s.height+10, 50, 50);//use YourImageView. height and width 
              imgview.frame=frame;
        }
        return YES;
  }
  </code></pre>
  
  <p>but every time the <em>cursor starts just before</em> the image view,</p>
  
  <p>But <strong><code>i need to jump/ move the cursor after the image when ever i added the image, jus like as folows,</code></strong></p>
  
  <p>My requrement is user can type text in text view and he can add an image with in the text view <strong>then from the next line after image he can able to enter text again,</strong></p>
  
  <p>just like we <strong>attach images in this stack over flow box like this</strong></p>
  
  <p><img src="https://i.stack.imgur.com/ZTrY6.png" alt="enter image description here"></p>
  
  <p>After insert image he could able to enter text again,</p>
  
  <p>how to do this any help.. thanks in advance</p>
  
  <p>my previous question: <a href="https://stackoverflow.com/questions/13263808/how-to-add-image-with-in-uitextview-just-like-in-stackoverflow-questin-box">Adding Images to UITextView</a></p>