这是我的按钮方法。当我按下按钮时,它的值是每次增加一并显示到标签中。然后它达到 6 然后像 1.0 、 7 = 1.1、 8 = 1.2 、 12 像 2.0 像板球那样转换格式。
我怎样才能做到这一点?
-(void)OneNoBTNPressedMethod
{
// LBL it's my label & display the text
NSString * overStorage = LBL.text;
// perform the addition operation
CalcOperation operation;
operation = Plus;
//add one every time when we press the button
NSString * overOneBTNStr = [NSString stringWithFormat:@"1"];
NSString *overVal = overOneBTNStr;
LBL.text= [NSString stringWithFormat:@"%qi",[overVal longLongValue]+[overStorage longLongValue]];
}
提前谢谢..