简体   繁体   中英

dequeueReusableCellWithIdentifier:forIndexPath EXEC_BAD_ACCESS

Normally Everything is ok dequeueReusableCellWithIdentifier:forIndexPath works return a valid cell but rarely returns nil

I use Storyboard.And I cant catch exception Everythins is fine but My app in release sometimes gives this exception I can only see this exception in crashlytics

CategoryLeftTableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"CategoryLeftTableViewCell" forIndexPath:indexPath];

Normaly above code is fine lots of time no problem but rarely it returns nil

Without any further information, I can only guess. Thus, my guess is that you may be forgotten to give a name to the prototype cells of your table view. You can do it by clicking the cell and setting the cell identifier, it can be any name, but it will signify to programme that you are in interaction with that cell type.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM