Skip to content

Commit 4c24d1e

Browse files
yFeiiGY
andauthored
fix: xcode16 ios18 crash (#1196)
Co-authored-by: GY <hishiguangyuan@didiglobal.com>
1 parent 166a1a9 commit 4c24d1e

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

iOS/DoraemonKit/Src/Core/Entry/Home/DoraemonHomeViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSe
147147
}
148148

149149
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
150-
DoraemonHomeCell *cell = [self.collectionView dequeueReusableCellWithReuseIdentifier:DoraemonHomeCellID forIndexPath:indexPath];
151150
NSInteger row = indexPath.row;
152151
NSInteger section = indexPath.section;
153152

154153
if (section < _dataArray.count) {
154+
DoraemonHomeCell *cell = [self.collectionView dequeueReusableCellWithReuseIdentifier:DoraemonHomeCellID forIndexPath:indexPath];
155155
NSDictionary *dict = _dataArray[section];
156156
NSArray *pluginArray = dict[@"pluginArray"];
157157
NSDictionary *item = pluginArray[row];

iOS/DoraemonKit/Src/Core/Entry/Home/Settings/KitManager/View/DoraemonKitManagerCell.m

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ @interface DoraemonKitManagerCell()
1414
@property (nonatomic, strong) UIImageView *icon;
1515
@property (nonatomic, strong) UILabel *name;
1616
@property (nonatomic, strong) UIImageView *select;
17-
@property (nonatomic, strong) UIView *maskView;
17+
@property (nonatomic, strong) UIView *coverView;
1818

1919
@end
2020

@@ -36,7 +36,7 @@ - (instancetype)initWithFrame:(CGRect)frame {
3636
self.layer.borderColor = [UIColor doraemon_colorWithHexString:@"#EEEEEE"].CGColor;
3737

3838
[self addSubview:self.centerView];
39-
[self addSubview:self.maskView];
39+
[self addSubview:self.coverView];
4040
[self addSubview:self.select];
4141

4242
[self.centerView addSubview:self.icon];
@@ -89,13 +89,13 @@ - (UIImageView *)select{
8989
return _select;
9090
}
9191

92-
- (UIView *)maskView{
93-
if (!_maskView) {
94-
_maskView = [[UIView alloc] initWithFrame:self.bounds];
95-
_maskView.backgroundColor = [UIColor whiteColor];
96-
_maskView.alpha = 0.5;
92+
- (UIView *)coverView{
93+
if (!_coverView) {
94+
_coverView = [[UIView alloc] initWithFrame:self.bounds];
95+
_coverView.backgroundColor = [UIColor whiteColor];
96+
_coverView.alpha = 0.5;
9797
}
98-
return _maskView;
98+
return _coverView;
9999
}
100100

101101

@@ -106,14 +106,14 @@ - (void)update:(NSString *)image name:(NSString *)name select:(BOOL)select editS
106106
self.select.hidden = NO;
107107
if (select) {
108108
self.select.image = [UIImage doraemon_xcassetImageNamed:@"doraemon_check_circle_fill"];
109-
self.maskView.hidden = YES;
109+
self.coverView.hidden = YES;
110110
}else{
111111
self.select.image = [UIImage doraemon_xcassetImageNamed:@"doraemon_check_circle"];
112-
self.maskView.hidden = NO;
112+
self.coverView.hidden = NO;
113113
}
114114
}else{
115115
self.select.hidden = YES;
116-
self.maskView.hidden = YES;
116+
self.coverView.hidden = YES;
117117
}
118118
}
119119

0 commit comments

Comments
 (0)