Note that there are some explanatory texts on larger screens.

plurals
  1. PONot sure of the value being retrieved from NSDictionary
    primarykey
    data
    text
    <p>I want to retrive a value from a NSDictionary.</p> <p>Here is a snippet of code:</p> <pre><code>NSDictionary *metadataDict = [representation metadata]; NSLog(@"%@",metadataDict); </code></pre> <p>"DateTimeOriginal" is the value I want to retrieve from the following output.</p> <pre><code>{ ColorModel = RGB; DPIHeight = 72; DPIWidth = 72; Depth = 8; Orientation = 6; PixelHeight = 1936; PixelWidth = 2592; "{Exif}" = { ApertureValue = "2.970854"; ColorSpace = 1; ComponentsConfiguration = ( 1, 2, 3, 0 ); DateTimeDigitized = "2011:09:28 09:35:36"; DateTimeOriginal = "2011:09:28 09:35:36"; ExifVersion = ( 2, 2, 1 ); ExposureMode = 0; ExposureProgram = 2; ExposureTime = "0.06666667"; FNumber = "2.8"; Flash = 24; FlashPixVersion = ( 1, 0 ); FocalLength = "3.85"; ISOSpeedRatings = ( 320 ); MeteringMode = 5; PixelXDimension = 2592; PixelYDimension = 1936; SceneCaptureType = 0; SensingMethod = 2; Sharpness = 2; ShutterSpeedValue = "3.9112"; SubjectArea = ( 1295, 967, 699, 696 ); WhiteBalance = 0; }; "{GPS}" = { Latitude = "37.54216666666667"; LatitudeRef = N; Longitude = "126.95"; LongitudeRef = E; TimeStamp = "01:19:05.00"; }; "{TIFF}" = { DateTime = "2011:09:28 09:35:36"; Make = Apple; Model = "iPhone 4"; Orientation = 6; ResolutionUnit = 2; Software = "4.3.5"; XResolution = 72; YResolution = 72; "_YCbCrPositioning" = 1; }; </code></pre> <p>}</p> <p>I know it's long but I tried these three and it still would not work.</p> <p>NSLog(@"valueForKey %@", [metadataDict valueForKey:@"DateTimeOriginal"]); NSLog(@"valueForKeyPath %@", [metadataDict valueForKeyPath:@"DateTimeOriginal"]); NSLog(@"objectForKey %@", [metadataDict objectForKey:@"DateTimeOriginal"]);</p> <p>Does anyone know what kind of datatype is in the NSDictionary and how I can retrieve it?</p> <p>Thanks much.</p> <p>Above project link: <a href="http://dl.dropbox.com/u/12439052/TheK2.zip" rel="nofollow">http://dl.dropbox.com/u/12439052/TheK2.zip</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload