TTTextBarController character count
i am using TTTextBarController开发者_运维问答 from Three20 library.
i want to count the number of characters,which user going to write in this control. And have to limit maximum number of character to 500. User should not exceed than the 500 characters.
How can i achieve this.
Regards
Solved
int len = textBar.textEditor.text.length;
NSLog(@" len = %d", len);
if (len >=160) {
//do something here
} else {
//do something here
}
精彩评论