how to prevent user to editing from geiven range in iphone textView
<p>hi 
     i am currently worked on  simple textview application in which i need prevent user to write data in textView &amp; after preventing he may be change other value of textview.below my code for prevernting user to write into textview.</p>

<pre><code>- (void)textViewDidChange:(UITextView *)textView
{
    NSString *textValue=textView.text;
    NSInteger intLen=[textValue length];
    if(intlen&gt;280){
      textView.editable=No; 
    }
    else
    {   
      textView.editable=YES;    
      if(intLen &lt;=140)
      {
        intLen=140-intLen;
        intSMSValue=1;
        lblSmscounter.text=[[NSNumber numberWithInt:intSMSValue]stringValue];
            lblCountChar.text=[[NSNumber numberWithInt:intLen] stringValue]; 
     }
     if((intLen&gt;140)&amp;&amp;(intLen &lt;=280))
     {
        intLen=280-intLen;
        intSMSValue=2;
        lblSmscounter.text=[[NSNumber numberWithInt:intSMSValue]stringValue];
        lblCountChar.text=[[NSNumber numberWithInt:intLen] stringValue];        
     }
   }
}
</code></pre>

<p>but in my code iam prevent user to write more than 280 bt user caneditable the previous text
is any solution over then out of help me using any code snnipet.</p>
