如果我用抓在plist中的數據:如何根據條件聲明獲取plist項目?
NSString *path = [[NSBundle mainBundle] pathForResource:@"Providers" ofType:@"plist"];
dataArray = [NSMutableArray arrayWithContentsOfFile:path];
for (NSDictionary *dictionary in dataArray)
{
text = [dictionary valueForKey:@"text"];
checked = [dictionary valueForKey:@"checked"];
NSLog(@"%@ checked value is: %@", text, checked);
}
我怎麼可能去寫檢查,看看只有檢查設置爲YES如果是這樣輸出的條件語句該供應商
檢查一個BOOL或字符串? –
checked BOOL – hanumanDev