我正在尝试为 Iphone 制作自定义键盘(数字键盘):) 但我无法找到对点/“进行编码”。请帮我!...
谢谢你 :)
我有这个:
- (IBAction)dot:(id)sender{
numberr.text = [numberr.text stringByAppendingString:@"."];}
- (IBAction)number1:(id)sender{
numberr.text = [NSString stringWithFormat:@"%.f1", [numberr.text floatValue]];
}
- (IBAction)number2:(id)sender{
numberr.text = [NSString stringWithFormat:@"%.f2", [numberr.text floatValue]];
}
- (IBAction)number3:(id)sender{
numberr.text = [NSString stringWithFormat:@"%.f3", [numberr.text floatValue]];
}
- (IBAction)number4:(id)sender{
numberr.text = [NSString stringWithFormat:@"%.f4", [numberr.text floatValue]];
}
- (IBAction)number5:(id)sender{
numberr.text = [NSString stringWithFormat:@"%.f5", [numberr.text floatValue]];
}
- (IBAction)number6:(id)sender{
numberr.text = [NSString stringWithFormat:@"%.f6", [numberr.text floatValue]];
}
- (IBAction)number7:(id)sender{
numberr.text = [NSString stringWithFormat:@"%.f7", [numberr.text floatValue]];
}
- (IBAction)number8:(id)sender{
numberr.text = [NSString stringWithFormat:@"%.f8", [numberr.text floatValue]];
}
- (IBAction)number9:(id)sender{
numberr.text = [NSString stringWithFormat:@"%.f9", [numberr.text floatValue]];
}
- (IBAction)number0:(id)sender{
numberr.text = [NSString stringWithFormat:@"%.f0", [numberr.text floatValue]];
}
- (IBAction)del:(id)sender{
numberr.text = @"";
}