How do I get a CFGregorianDate (currentSelectDate) into an NSDictionary?
I get this error with the code below:
Sending ‘CFGregorianDate’ to parameter of incompatible type ‘id’
My code:
NSDictionary *userInfo = [NSDictionary dictionaryWithObject: currentSelectDate forKey:@"currentSelectDate"];
CFGregorianDate is basically a C structure. First create a NSData instance to hold its bytes:
and then place that in your dictionary instead:
To retrieve it, let’s assume you have a CFGregorianDate allocated (in this case, on the stack), again called
currentSelectDate:Best wishes to you in your endeavors.