0

我有一个NSDictionary这样的

`(
    {
    EmployeeCode = 7593;
    InDate = "27/02/2013";
    InTime = "08:11";
    InTime2 = "00:00";
    OutDate = "27/02/2013";
    OutDate2 = "01/01/1901";
    OutTime = "17:42";
    OutTime2 = "00:00";
    Present = 1;
}

) Then I want to retriew values from this. So I putNSLog`

` NSLog(@"TESTING---------- %@",[dicDates valueForKey:@"OutDate"] );`

但该值用括号显示

TESTING---------- ( "27/02/2013" 这是什么原因。请帮帮我

谢谢

4

1 回答 1

0

您正在调用错误的方法:而不是valueForKey:您需要调用objectForKey:.

valueForKey:方法用于键值编码,而objectForKey:用于通过提供的关联映射检索对象NSDictionary

于 2013-03-05T03:33:57.753 回答