Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash掉了 #19

Open
PengJiang520 opened this issue Feb 8, 2021 · 3 comments
Open

crash掉了 #19

PengJiang520 opened this issue Feb 8, 2021 · 3 comments

Comments

@PengJiang520
Copy link

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

@PengJiang520
Copy link
Author

用的是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
Copy link
Author

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

@maltsugar
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants