RollingNotice icon indicating copy to clipboard operation
RollingNotice copied to clipboard

crash掉了

Open PengJiang520 opened this issue 3 years ago • 3 comments

Exception name:[<UIView 0x10a905450> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key reuseIdentifier.

PengJiang520 avatar Feb 08 '21 17:02 PengJiang520

用的是xib设置的frame _marketView 继承GYRollingNoticeView _marketView.dataSource = self; _marketView.delegate = self; [_marketView registerNib:[UINib nibWithNibName:@"HomeMarketCell" bundle:nil] forCellReuseIdentifier:HomeMarketCellId];

#pragma mark -- GYRollingNoticeViewDelegate

  • (NSInteger)numberOfRowsForRollingNoticeView:(GYRollingNoticeView *)rollingView {

    return self.marketArray.count;

}

  • (__kindof GYNoticeViewCell *)rollingNoticeView:(GYRollingNoticeView *)rollingView cellAtIndex:(NSUInteger)index {

    HomeMarketCell *cell = [rollingView dequeueReusableCellWithIdentifier:HomeMarketCellId]; // [cell noticeCellWithArr:_arr0 forIndex:index]; return cell;

}

PengJiang520 avatar Feb 08 '21 17:02 PengJiang520

设置了源 for (id model in responseObject[@"data"]) { MarketModel *marketModel = [MarketModel mj_objectWithKeyValues:model]; [weakSelf.marketArray addObject:marketModel]; } [weakSelf.marketView reloadDataAndStartRoll];

PengJiang520 avatar Feb 08 '21 17:02 PengJiang520

打个断点 看下哪行代码 崩溃

maltsugar avatar Feb 22 '21 06:02 maltsugar