修复了数组可能越界的问题

This commit is contained in:
fengshuo
2022-11-11 17:46:37 +08:00
parent e855f87849
commit c22ede0a13
146 changed files with 515 additions and 371 deletions

View File

@@ -12,6 +12,7 @@
#import <YYText.h>
///Tool
#import "ThemeColor.h"
#import "NSArray+Safe.h"
///Model
#import "GiftLuckyBroadcastModel.h"
@@ -151,7 +152,7 @@
- (void)setupCustomCell:(UICollectionViewCell *)cell forIndex:(NSInteger)index cycleScrollView:(SDCycleScrollView *)view {
XPGiftLuckyGiftBroadcastCell *myCell = (XPGiftLuckyGiftBroadcastCell *)cell;
GiftLuckyBroadcastModel * info = [self.records objectAtIndex:index];
GiftLuckyBroadcastModel * info = [self.records safeObjectAtIndex1:index];
myCell.giftInfo = info;
}