iOS UITextField限制输入长度
程序员文章站
2022-04-06 08:08:48
...
if (textField == self.putInTextField) {
if (textField.text.length > self.dataModel.peoplenum.length) {
textField.text = [textField.text substringToIndex:self.dataModel.peoplenum.length ];
}
}