At a certain point in my app within a tableView:cellForRowAtIndexPath:
method, I call [tableView dequeueReusableCellWithIdentifier:identifier]
, and I get a fully-reproducable EXC_BAD_ACCESS crash on iOS 7.0.x devices, but never on iOS 7.1.x devices. I have numerous table views throughout the app, and I can call the dequeue method successfully elsewhere throughout the app.
I'm being intentionally vague because I'm not asking for a solution to the crash itself; I'm trying to get information on what specifically changed between 7.0 and 7.1 that would be causing any different behavior at all concerning UITableViewCells and the dequeue method. I have checked Apple's own 7.0 to 7.1 diffs document, but it claims there were no changes at all to UIKit. I'm also well-aware that Apple is famous for not telling "the whole story" in their developer documentation.
Code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
NSString static *identifier = @"MyTableViewCell";
// crashes on the following line
SMTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
if (cell == nil) {
cell = [[SMTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
}
// ...
} else {
// ...
}
}