摘要:
1、定义一个要保留的常量 #define NUMBERS @"0123456789.\n"2、实现delegate3、- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ NSCharacterSet *cs; cs = [[NSCharacterSetcharacterSetWithCharactersInString:NUMBERS] invertedSet]; NSStri 阅读全文