//控制输入框的字数
- (void)textViewDidChange:(UITextView *)textView
{
NSInteger number = [textView.text length];
if (number > 300) {
textView.text = [textView.text substringToIndex:300];
number = 300;
}
_evalutionLimitNumberLabel.text=[NSString stringWithFormat:@"%i/300",number];
}
iOS 控制输入框的字数?(textFliedView,textFlied等)
时间: 2024-10-10 15:27:53