0
我現在得到了小數工作,但由於某種原因它顯示倒退。這也可能是我缺乏數學技能,但這裏是代碼:小數位在Xcode中顯示不正確?
-(IBAction)buttonDigitPressed:(id)sender {
currentNumber = (float)[sender tag] + currentNumber /10;
priceOne.text = [NSString stringWithFormat:@"%.2f",currentNumber];
}
現在,當我在這個順序我的自定義鍵盤上鍵入:5-2-1,它向後顯示數字:1.25。我希望它顯示5.21。有任何想法嗎?
第二次嘗試?你的意思是你之前曾問過這個問題?如果您要刪除問題再次提問,請不要再次提問。 http://meta.stackexchange.com/questions/74459/user-systematically-deleting-and-re-posting-questions/ – 2011-01-29 14:30:03
這不是同一個問題,我的意思是第二次嘗試詢問這個特定主題。 – 2011-01-29 14:31:59