开发者

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
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜