gpt4 book ai didi

ios - __NSCFDictionary stringByDeletingPathExtension 崩溃

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:18:23 26 4
gpt4 key购买 nike

我在从 Web 服务获取的 UITableView 中显示数据。在尝试将此数据添加到 UITableView 时,我遇到了一些奇怪的崩溃

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary stringByDeletingPathExtension]: unrecognized selector sent to instance 0x7f9bc68530e0'

谁能告诉我这是什么错误。这是我的回应

<__NSCFArray 0x7fd2846dec80>(
{
DISTANCE = "2677.2557594500167";
POPULARITY = 0;
PRICE = "";
"bar_id" = 1;
"event_id" = "";
"event_name" = "";
"is_following" = 0;
"participant_count" = 0;
"venue_address" = “abc”;
"venue_image" = "http://dsfdsf.com/uploads/venue_icon/original/8PHHBUbASoZZXdQNOyqL1jKAmd08rowg.jpg";
"venue_name" = "CLUB";
},
{
DISTANCE = "2677.2557594500167";
POPULARITY = 0;
PRICE = "";
"bar_id" = 2;
"event_id" = "";
"event_name" = "";
"is_following" = 0;
"participant_count" = 0;
"venue_address" = “def”;
"venue_image" = "http://dsfdsf.com/uploads/venue_icon/original/8PHHBUbASoZZXdQNOyqL1jKAmd08rowg.jpg;
"venue_name" = “Club";
}
)

这就是我向 UITableViewCell 添加数据的方式

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
cell.lbl_eventName.text = [[arrayEventData valueForKey:@"venue_name"]objectAtIndex:indexPath.row];
}

最佳答案

试试这个:

cell.lbl_eventName.text = [[arrayEventData objectAtIndex:indexPath.row] valueForKey:@"venue_name"];

关于ios - __NSCFDictionary stringByDeletingPathExtension 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41693347/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com