iOSアプリ向けの機能があります。NSStringvalue
には値とキーが含まれていますが、行key
の NSMutableDictionary に割り当てられていないようですdata
[data setValue:value forKey:key]
-(NSMutableDictionary *)parseCode:(NSString *)string{
NSArray *array = [string componentsSeparatedByString:@"||"];
NSMutableDictionary *data;
for(id object in array){
NSArray *objectAndKey = [object componentsSeparatedByString:@"::"];
NSString *key =[objectAndKey objectAtIndex:0];
NSString *value = [objectAndKey objectAtIndex:1];
[data setValue:value forKey:key];
[self alertMeWithString:[data valueForKey:key]];
}
return data;
}