哪个更好?
static unsigned unitFlags;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit;
});
或者这和写作一样有效吗
unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit;
还是有其他一些更有效的模式?'unitFlags' 的定义会更好吗?