1
計算時差我有2個標籤,我使用下面的代碼設置爲當前時間:如何從NSDateFormatter
NSDateFormatter *dateformatter = [[NSDateFormatter alloc] init];
[dateformatter setDateFormat:@"hh:mma"];
time2.text = [dateformatter stringFromDate:[NSDate date]];
[dateformatter release];
labelCount++;
當按鈕被點擊標籤,一個將改變爲當前時間,當按鈕再次點擊標籤2將改變爲當前時間,但我希望能夠更改第三個標籤以顯示這些時間之間的差異。任何幫助/指導將不勝感激。
非常好,謝謝。 – TJ15 2012-03-22 10:22:40