标签: iphone iphone-sdk-3.0
我需要倒计时而不是时间
如何在iphone sdk中使用日期来计算天数倒计时
答案 0 :(得分:2)
NSDate future = [NSDate dateWithString:@"2010-08-30 00:00:00 +0000"]; NSDate past = [NSDate dateWithString:@"2010-03-15 00:00:00 +0000"]; int days = [future timeIntervalSinceDate:past] / 86400;