这个bug有时会出现,有时侯又好用,完全不知道从哪下手,遍历这个model的时候,也是大概遍历到20多个的时候才会崩溃。
ringa_lee2017-04-18 09:46:49
for in traverse without modifying the traversed array. It is recommended to change it to array enumerateObjectsUsingBlock... method to traverse. This can be modified without crashing. I have encountered the same problem
伊谢尔伦2017-04-18 09:46:49
Modifying and deleting the array while traversing will definitely cause problems
天蓬老师2017-04-18 09:46:49
According to the prompt, your HCFavoriteIconView does not have the nodeIndex attribute or method! If you want to make modifications while traversing the array, it is recommended to use enum to traverse
黄舟2017-04-18 09:46:49
When traversing array elements, it is normal logic to add the required elements to a variable array, and then assign the variable array back after traversing it
迷茫2017-04-18 09:46:49
HCFavoriteIconView
没有nodeIndex
, 或者你把nodeIndex
发给了不存在这个方法的对象0x7e3930e0
, you can use category to debug the reason:
@interface NSObject(testing)
- (NSString *)nodeIndex;
@end
@implementation NSObject(testing)
- (NSString *)nodeIndex{
NSAssert(NO, @"class %@ has no method of nodeIndex", [self class]);
return nil;
}
@end
阿神2017-04-18 09:46:49
The console output shows [HCFavoriteIconView nodeIndex], indicating that HCFavoriteIconView cannot access this nodeIndex. First, confirm that the nodeIndex of your object exists.