我想在计算器屏幕上逐位删除一个数字,但我只能删除完整的数字。有什么方法吗?
-(IBAction)cancelInput:(float)result1{
NSString *myString = [[NSNumber numberWithFloat:result] stringValue];
int str=[myString length]-1;
NSString *newstring = [[NSNumber numberWithInt:str] stringValue];
calculatorScreen.text= [NSString stringWithFormat:newstring];
//NSLog(@"%d ",str);
}