代码无法运行错误:方法调用的参数太多,预期 1,有 2
NSDate *nows =[NSDate date];
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *dateComponents = [gregorian components:(NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit) fromDate:nows];
NSInteger hour = [dateComponents hour];
NSInteger minute = [dateComponents minute];
NSInteger second = [dateComponents second];
NSInteger month=[dateComponents month];
NSInteger day=[dateComponents day];
NSLog(@"%lu",day);
statusItem.image=[NSImage imageNamed:@"status%lu.png",day];
[gregorian release];
是不是试图将 Integer 类型转换为字符串类型?我能做些什么?