Sto cercando di leggere plist che contiene gammaCome leggere Array da iOS plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>key1</key>
<string>value1</string>
<key>key2</key>
<string>value2</string>
<key>keyarray1</key>
<array>
<string>keyitem1</string>
<string>keyitem2</string>
</array>
</dict>
</plist>
quando provo a leggere valueForKey: @ "keyarray1", ottengo valore nullo. Ho provato a leggere come una stringa e nessun dado array inutile.
My Code
NSDictionary * values=[[NSDictionary alloc] initWithContentsOfFile:@"values.plist"];
NSArray *arrayValues=[[NSArray alloc] initWithArray:[values valueForKey:@"keyarray1"]];
Potresti mostrarci il tuo codice completo che legge il plist? – Undo
Posso leggere key1 e key2 ma non leggere array. – ram2013
inviare una schermata di ur plist – Naveen