下の画像のようなplistデータがあります。
CDateと等しいNSDateが選択されている場合、「テキスト」値にアクセスするにはどうすればよいUIDatePicker
ですか?
下の画像のようなplistデータがあります。
CDateと等しいNSDateが選択されている場合、「テキスト」値にアクセスするにはどうすればよいUIDatePicker
ですか?
だからあなたは基本的に欲しい
NSString* path = [[NSBundle mainBundle] pathForResource:@"file" ofType:@"plist"];
NSArray* a = [NSArray arrayWithContentsOfFile:path];
for (NSDictionary *d in a)
{
NSString *cdate = [d objectForKey:@"CDate"];
if ([cdate isEqualToString:@"Whatever is currently selected"])
{
NSString *text = [d objectForKey:@"Text"];
// do something with text here
}
}
これに遭遇し、更新が予定されていると思いました
NSDictionary *initialDefaults = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Defaults" ofType:@"plist"]];