ここで使用したいコードスニペットを見つけましたが、 「文字列に」戻して動作するかどうかを確認する方法がわかりません...
// some strings for test
NSString *cpu = [[NSString alloc] initWithFormat:@"%.0f", [_cpuSlider value]];
NSString *ram = [[NSString alloc] initWithFormat:@"%.0f", [_ramSlider value]];
NSString *hdd = [[NSString alloc] initWithFormat:@"%.0f", [_hddSlider value]];
// put them into dictionary
NSDictionary *test = [NSDictionary dictionaryWithObjectsAndKeys:cpu, @"CPU", ram, @"RAM", hdd, @"HDD", nil];
// start of the code from page above
NSMutableData *myData = [[NSMutableData alloc]init];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc]initForWritingWithMutableData:myData];
[archiver encodeObject:test forKey:@"MyKEY"];
[archiver finishEncoding];
id testJson = [NSJSONSerialization JSONObjectWithData:myData options:0 error:nil];
// end of code
// HERE I'd like know what to put in to see it as a string..e.g. { "CPU"=value; etc...}
UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"MLIA" message:????? delegate:nil cancelButtonTitle:@"Zavřít" otherButtonTitles: nil];
[av show];
どうもありがとう!