更新时间:2022-11-22 15:11:20
您的意思是 NSNumber
code> + numberWithInt:和 + numberWithBool:
方法,而不是 NSDate
?它是定义这些方法的NSNumber。
Do you mean NSNumber
's +numberWithInt:
and +numberWithBool:
methods, not NSDate
? It's NSNumber that defines those methods.
要将数字转换为日期,它实际上取决于数字是多少。如果是UNIX时间戳,则 [NSDate dateWithTimeIntervalSince1970:theTimestampInSeconds]
。
To convert a number to a date, it really depends on what the number is. If it's a UNIX timestamp, then [NSDate dateWithTimeIntervalSince1970:theTimestampInSeconds]
.
至于添加 NSArray
对象到字典:
[yourDictionary setObject:yourArray forKey:@"SomeKey"];
如果您需要更多帮助,您需要发布一些代码,因为您的问题不是很清楚。
You'll have to post some code if you need more help as your question isn't very clear.