我有一个 UITextField 可以输入宽度为 50 和高度为 24 的数字,但是当我输入数字时,这些数字在返回键盘后部分可见(数字的一半),这是完美的。以下是我的代码。任何想法请帮助我
TxtFieldAdditionalFee=[[UITextField alloc]initWithFrame:CGRectMake(150, 37, 50, 25)];
TxtFieldAdditionalFee.backgroundColor=[UIColor whiteColor];
[TxtFieldAdditionalFee setTextColor:[UIColor colorWithRed:(66/255.f) green:(119/255.f) blue:(169/255.f) alpha:1.0f]];
TxtFieldAdditionalFee.keyboardAppearance=UIKeyboardAppearanceAlert;
[TxtFieldAdditionalFee setKeyboardType:UIKeyboardTypeNumbersAndPunctuation];
TxtFieldAdditionalFee.font=[UIFont fontWithName:@"Verdana" size:12];
TxtFieldAdditionalFee.delegate=self;