- (UICollectionView *)imageCollectView {
if (!_imageCollectView) {
UICollectionViewFlowLayout *flowLayot = [[UICollectionViewFlowLayout alloc] init];
flowLayot.scrollDirection = UICollectionViewScrollDirectionVertical;
_imageCollectView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, kIphoneWidth, kIphoneHeight) collectionViewLayout:flowLayot];
_imageCollectView.backgroundColor = kRGBColor(2, 243, 145, 1);
_imageCollectView.delegate = self;
_imageCollectView.dataSource = self;
[_imageCollectView registerNib:[UINib nibWithNibName:@"AddImageViewCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:cellString];
[_imageCollectView registerNib:[UINib nibWithNibName:@"PatientImageCollectReuseView" bundle:nil] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:reuseViewString];
}
return _imageCollectView;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
PatientImageCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellString forIndexPath:indexPath];
程序在这里奔溃
return cell;
}
此方法写在cell中的,没到return 就奔溃了
报错:thread 1 signal sigabrt
奔溃日志:
invalid mode 'kCFRunLoopCommonModes' provided to CFRunLoopRunSpecific - break on _CFRunLoopError_RunCalledWithInvalidMode to debug. This message will only appear once per execution.
libc++abi.dylib: terminate_handler unexpectedly threw an exception
求大神帮忙看看哪里有问题?