更换方法名:safeObjectAtIndex1 -> xpSafeObjectAtIndex

This commit is contained in:
eggmanQQQ
2024-06-16 16:18:06 +08:00
parent 384bc3e95c
commit 49d17e1c6f
210 changed files with 529 additions and 527 deletions

View File

@@ -73,13 +73,13 @@
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
XPRoomQuidkMessageCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPRoomQuidkMessageCell class]) forIndexPath:indexPath];
if (self.titleArray.count > 0) {
cell.title = [self.titleArray safeObjectAtIndex1:indexPath.row];
cell.title = [self.titleArray xpSafeObjectAtIndex:indexPath.row];
}
return cell;
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
NSString *str = [self.titleArray safeObjectAtIndex1:indexPath.row];
NSString *str = [self.titleArray xpSafeObjectAtIndex:indexPath.row];
NSDictionary *dic = @{NSFontAttributeName:[UIFont systemFontOfSize:12]};
CGSize size = [str boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, 25) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil].size;
return CGSizeMake(size.width + 10, 30);
@@ -95,7 +95,7 @@
return;
}
self.lastSendTime = time2;
NSString *str = [self.titleArray safeObjectAtIndex1:indexPath.row];
NSString *str = [self.titleArray xpSafeObjectAtIndex:indexPath.row];
[self sendText:str];
}
}