ITeye博客

常用代码

wanglei0119 · 2011-04-01 10:29 · iPhone · 移动开发 · Markdown

**Degrees,Radians相互转换 ** CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}; CGFloat RadiansToDegrees(CGFloat radians) {return radians * 180 / M_PI;};

精确的时间差 NSTimeInterval begin = CFAbsoluteTimeGetCurrent(); ... NSTimeInterval gap = (CFAbsoluteTimeGetCurrent() - begin);

得到year,month,day,week,weekday NSDateComponents *components = components:NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSWeekdayCalendarUnit fromDate:targetDate];

; ; ; ; ;

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。