views:

332

answers:

2

Hi all developer, I have a UITextView, user can write maximum 160 character in the textView. How can i fixed the maximum text length of a UITextView?

A: 

you can see a similar question here. it has got the answer

Nithin
A: 

Replace

 - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string

with

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text

which is answered here

Madhup