'-[__NSDictionaryI length]: unrecognized selector sent to instance' - trying to figure out why

前端 未结 4 1481
别跟我提以往
别跟我提以往 2021-01-13 08:08

I\'ve a UITableView with custom UILabel for title and one another to subtitle, in order to align the text to right.

My data come from web s

4条回答
  •  不思量自难忘°
    2021-01-13 08:47

    In your tableView:willDisplayCell:forRowAtIndexPath:,

    check this line,

    cell = [Netroads willDisplayFlatDesignCell:cell];
    

    something wrong with this method, [Netroads willDisplayFlatDesignCell];

    You are trying to get a length from a NSDictionary instead of NSArray. If you are loading data from a JSON webservice, probably you are parsing NSDictionary as an NSArray. Fix that method, then it won't crash.

提交回复
热议问题