我传递了一个NSDictionary,但函数得到了nil

时间:2014-08-11 20:36:22

标签: objective-c ios7 nsdictionary

这很奇怪。我有一个NSDictionary。我将它传递给一个方法。 NSDictionary已填满,但收件人收到零。可能是什么?

    [self.manager POST:url parameters:params success:^(NSURLSessionDataTask *task, NSDictionary *responseObject)
     {
         NSString *code = responseObject[kCODE];

         if ([code isEqualToString:rAPI_SUCCESS]) {
             fulfiller([[ResponseDataModel alloc] initWithDictionary:responseObject]);

我在fullfiler行中放了一个断点,然后是值:

Printing description of responseObject:
{
    code = "API_SUCCESS";
    data =     {
        cliente =         {
            celular = ******;
            email = "test@****.com";
            nombre = test;
            "user_token" = ACDF*****4;
            "ver_celular" = 1;
        };
    };
    message = "The operation was successful";
    success = 1;
}

现在在接收器中:

- (id)initWithDictionary:(NSDictionary *)dictionary {
    if (!nsDictionaryClass) nsDictionaryClass = [NSDictionary class];

Printing description of dictionary:
(NSDictionary *) dictionary = <variable not available>

(自我是有效的参考)

这是在调试模式下的Xcode版本5.1.1(5B1008)。

0 个答案:

没有答案