I have two questions, related to the apple sample code for the iPhone, called "Locations." My first question relates to NSDateFormatter. From apple documentation, the way to create a date in string format is the following
This program uses core data, and instead of date, they use [event calendarDate], both of which are created in the model portion of the program. I can't figure where these (event and calendarDate) point to any sort of NSDate object? Any thoughts?
The second question has to do with the following code
This is defined in the .m file of a class called "UIImageToDataTransformer". This is located in the model folder of the program. This part of the program basically converts photos to and from PNG format. My question is the following -- what does the above class method do? I can't get any documentation on the apple site on the expression "class". Does "+(Class)" designate that this is a class method for the class UIImageToDataTransformer? Any help appreciated.
Adam
Code:
NSDateFormatter*dateFormatter=[[NSDateFormatter alloc]init];
NSDate*date=[NSDate dateWithTimeIntervalSinceReferenceDate:118800];
NSString*myDateString=[dateFormatter stringFromDate:date];
This program uses core data, and instead of date, they use [event calendarDate], both of which are created in the model portion of the program. I can't figure where these (event and calendarDate) point to any sort of NSDate object? Any thoughts?
The second question has to do with the following code
Code:
+(Class)transformedValueClass{
return [NSData class]}
This is defined in the .m file of a class called "UIImageToDataTransformer". This is located in the model folder of the program. This part of the program basically converts photos to and from PNG format. My question is the following -- what does the above class method do? I can't get any documentation on the apple site on the expression "class". Does "+(Class)" designate that this is a class method for the class UIImageToDataTransformer? Any help appreciated.
Adam