项目介绍:
UITextField *myText=[[UITextField alloc]initWithFrame:CGRectMake((self.view.frame.size.width-200)/2, 100, 200, 40)];myText.delegate=self;myText.placeholder=@"带小数点的键盘";myText.clearButtonMode=UITextFieldViewModeWhileEditing;myText.textAlignment=NSTextAlignmentLeft;myText.layer.borderColor=[UIColor grayColor].CGColor;myText.layer.borderWidth=1;myText.layer.masksToBounds=YES;myText.layer.cornerRadius=4;[self.view addSubview:myText]; RYNumberKeyboard *tNumberKb = [[RYNumberKeyboard alloc] init];tNumberKb.textFiled = myText; myText.inputView = tNumberKb;