From 49d17e1c6f886ed5539cb53d74e3945500a59c9a Mon Sep 17 00:00:00 2001 From: eggmanQQQ <3671373519@qq.com> Date: Sun, 16 Jun 2024 16:18:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E6=96=B9=E6=B3=95=E5=90=8D?= =?UTF-8?q?=EF=BC=9AsafeObjectAtIndex1=20->=20=20xpSafeObjectAtIndex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InputView/InputView/QEmotionHelper.m | 2 +- .../InputView/InputView/QinputPhotoView.m | 2 +- YuMi/CustomUI/ShareView/XPShareView.m | 4 +-- .../View/View/XPSessionFindNewGreetListView.m | 4 +-- .../View/XPSessionFindNewViewController.m | 6 ++-- .../View/XPSessionSayHelloViewController.m | 2 +- .../Cell/SessionUserInfoTableViewCell.m | 4 +-- .../View/Session/MSSessionPublicChatHallVC.m | 8 ++--- .../View/Session/SessionInfoViewController.m | 8 ++--- .../View/Session/SessionViewController.m | 22 ++++++------- .../Session/View/MSSessionScrollingView.m | 4 +-- .../SessionList/SessionListViewController.m | 4 +-- .../XPMineUserInfoEditTableViewCell.m | 2 +- .../View/Cell/XPMineGameTableViewCell.m | 4 +-- .../View/Cell/XPMineHeadItemTableViewCell.m | 4 +-- .../XPMineCollectPartyRoomViewController.m | 6 ++-- .../View/XPDressSearchViewController.m | 4 +-- .../View/XPDressUpShopCardViewController.m | 2 +- .../View/XPDressUpShopListViewController.m | 2 +- .../View/XPDressUpShopViewController.m | 2 +- .../View/XPMineDressUpBubbleViewController.m | 2 +- .../View/XPMineDressUpListViewController.m | 8 ++--- .../View/XPMineDressUpViewController.m | 2 +- .../Friend/XPMineAttentionViewController.m | 4 +-- .../View/Friend/XPMineFansViewController.m | 4 +-- .../View/Friend/XPMineFriendViewController.m | 6 ++-- .../View/Friend/XPRoomMessageBubbleView.m | 4 +-- .../GiveDiamond/View/XPMineGiveDiamondVC.m | 4 +-- .../XPGuildSuperAdminSetTableViewCell.m | 2 +- .../XPMineGuildIncomeDetailViewController.m | 2 +- .../XPMineGuildIncomeRecordViewController.m | 8 ++--- ...XPNewMineGuildIncomeRecordViewController.m | 4 +-- .../View/IncomeStatis/XPNewMineHallIncomeVC.m | 2 +- .../XPMineGuildManagerPerViewController.m | 2 +- .../XPMineGuildManagerSetViewController.m | 2 +- .../XPMineGuildRemoveMemberViewController.m | 4 +-- .../Setting/XPMineMangerListViewController.m | 4 +-- .../Guild/View/SubViews/XPGuildHeaderView.m | 4 +-- .../SubViews/XPGuildTimeMonthPickerView.m | 16 +++++----- .../XPMineGuildChooseManagerViewController.m | 2 +- .../XPMineGuildSuperAdminSetViewController.m | 2 +- .../Guild/View/XPMineClanViewController.m | 4 +-- .../View/XPMineGuildSearchViewController.m | 10 +++--- .../Guild/View/XPMineGuildViewController.m | 4 +-- .../XPIncomeRecordGoldDetailsPickViewView.m | 2 +- .../MineInfo/XPMineUserDataViewController.m | 6 ++-- .../XPMineUserInfoAlbumViewController.m | 2 +- .../XPMineUserInfoEditViewController.m | 6 ++-- .../XPMineUserInfoGiftWallSubViewController.m | 4 +-- .../MineInfo/XPMineUserInfoViewController.m | 6 ++-- .../View/SubViews/PINobleCenterTitleView.m | 2 +- .../SubViews/XPNoblePrivilegeContentCell.m | 4 +-- .../Noble/View/XPNobleCenterViewController.m | 8 ++--- .../Recharge/XPIAPRechargeViewController.m | 4 +-- .../Setting/XPMineBlackListViewController.m | 6 ++-- .../Setting/XPMineNotificaViewController.m | 2 +- .../Setting/XPMineSettingViewController.m | 6 ++-- .../View/Setting/XPMineSwitchLanguageVC.m | 4 +-- .../MineInfo/XPMineUserInfoGiftView.m | 4 +-- .../MineInfo/XPMineUserInfoVoiceCardView.m | 2 +- .../View/XPMineFansTeamViewController.m | 4 +-- .../View/XPMineFootPrintViewController.m | 8 ++--- .../View/XPMineUserInfoRecordedSoundVC.m | 2 +- .../YMMine/View/XPMineViewController.m | 2 +- .../YMMine/View/XPMineVisitorViewController.m | 6 ++-- .../YMMine/View/XPPermissionsViewController.m | 6 ++-- .../YMMine/View/XPPrivacyViewController.m | 2 +- .../Cell/XPMomentListCollectionViewCell.m | 2 +- .../View/Cell/XPMonentsCommentTableViewCell.m | 6 ++-- .../View/Cell/XPMonentsTableViewCell.m | 2 +- .../View/SubViews/XPMoentsTopicListView.m | 4 +-- .../View/SubViews/XPMonentsPhotoView.m | 24 +++++++------- .../SubViews/XPMonentsRecommendHeaderView.m | 4 +-- .../View/SubViews/XPMonentsUserInfoView.m | 4 +-- .../View/XPMoentsTopicListViewController.m | 4 +-- .../XPMomentsSimpleDetailViewController.m | 6 ++-- .../View/XPMonentsAttentionViewController.m | 6 ++-- .../View/XPMonentsDetailViewController.m | 6 ++-- .../View/XPMonentsInteractiveViewController.m | 6 ++-- .../View/XPMonentsLatestViewController.m | 6 ++-- .../View/XPMonentsMineViewController.m | 6 ++-- .../View/XPMonentsPublishViewController.m | 2 +- .../View/XPMonentsRecommendViewController.m | 6 ++-- .../View/XPMonentsTopicLatestViewController.m | 6 ++-- .../XPMonentsTopicRecommondViewController.m | 6 ++-- .../View/Cell/XPHomeBannerTableViewCell.m | 2 +- .../View/Cell/XPNewHomePartyTagView.m | 4 +-- .../View/Cell/XPNewHomePlayTableViewCell.m | 4 +-- .../Cell/XPNewHomeRecommendTableViewCell.m | 6 ++-- .../View/CustomView/XPNewHomeHeadView.m | 4 +-- .../View/PIHoemCategoryCollectionView.m | 10 +++--- .../Cell/XPHomeCollectRoomTableViewCell.m | 4 +-- .../View/SubView/XPHomeSearchRelateView.m | 8 ++--- .../Search/View/XPHomeSearchViewController.m | 4 +-- .../View/XPRoomSearchRecordViewController.m | 16 +++++----- .../View/XPHomePartyViewController.m | 4 +-- .../View/XPHomeRecommendViewController.m | 6 ++-- .../YMNewHome/View/XPNewHomeViewController.m | 4 +-- YuMi/Modules/YMRTC/RtcImpl/ZegoRtcImpl.m | 2 +- .../View/SubViews/XPAcrossRoomPKPanelView.m | 8 ++--- .../View/SubViews/XPAcrossRoomPKResultView.m | 4 +-- .../View/XPAcrossRoomPKSelectRoomView.m | 2 +- .../PIRoomActivityChoosePlayView.m | 4 +-- .../PIRoomActivityWebView.m | 4 +-- .../View/SubViews/XPAnchorPKResultView.m | 2 +- .../View/SubViews/XPAnchorPkPanelView.m | 4 +-- .../AnchorPK/View/XPAnchorPKSelectRoomView.m | 2 +- .../View/XPAnchorFansTaskViewController.m | 2 +- .../AnimationView/XPRoomAnimationHitView.m | 2 +- .../View/AnimationView/XPRoomAnimationView.m | 8 ++--- .../XPRoomGraffitiGiftAnimationView.m | 2 +- .../View/XPArrangeMicViewController.m | 2 +- .../View/SubViews/XPRoomBackMusicPlayerView.m | 8 ++--- .../View/XPRoomMusicLibraryViewController.m | 6 ++-- .../View/XPRoomTransferMusicViewController.m | 6 ++-- .../XPRoomFunctionContainerView.m | 2 +- .../View/CandyTree/View/XPCandyTreeMoreView.m | 2 +- .../View/CandyTree/View/XPCandyTreeRankView.m | 2 +- .../View/XPCandyTreeViewController.m | 2 +- .../FaceView/Presenter/XPRoomFacePresenter.m | 4 +-- .../View/FaceView/Presenter/XPRoomFaceTool.m | 2 +- .../FaceView/View/XPRoomFaceViewController.m | 14 ++++---- .../View/XPFirstRechargeSuccessView.m | 2 +- .../FirstRecharge/View/XPFirstRechargeView.m | 10 +++--- .../Presenter/Category/NSString+RW.m | 2 +- .../View/XPLittleGameMiniStageView.m | 2 +- .../View/XPLittleGameRoomListView.m | 6 ++-- .../View/XPLittleGameRoomOpenView.m | 4 +-- .../MenuContainerView/MSRoomMenuGameView.m | 8 ++--- .../MsRoomMessagChatHallView.m | 2 +- .../Tool/XPRoomMessageParser.m | 8 ++--- .../View/XPNetImageYYLabel.m | 4 +-- .../XPRoomMessageContainerView.m | 4 +-- .../View/XPRoomMoreMenuViewController.m | 4 +-- .../NewUserGreet/XPRoomNewUserGreetView.m | 2 +- .../XPRoomQuickMessageContainView.m | 6 ++-- .../View/XPReleaseRadioViewController.m | 4 +-- .../View/SubView/MSRoomGameHeadView.m | 2 +- .../RoomGame/View/SubView/MSRoomGameMsgView.m | 2 +- .../View/SubView/MSRoomGameVictoryView.m | 2 +- .../View/SubView/MSTabbarRoomGameView.m | 4 +-- .../View/SubViews/XPRoomPKPanelUserView.m | 4 +-- .../View/SubViews/XPRoomPKRecordNickView.m | 4 +-- .../View/SubViews/XPRoomPKSelectUserView.m | 28 ++++++++-------- .../View/SubViews/XPRoomPKTimePickerView.m | 12 +++---- .../View/RoomPK/View/XPRoomPKPanelView.m | 8 ++--- .../View/RoomPK/View/XPRoomPKProgressView.m | 20 ++++++------ .../View/XPRoomPKRecordViewController.m | 2 +- .../View/RoomPK/View/XPRoomPKResultView.m | 4 +-- .../View/RoomPK/View/XPRoomPKViewController.m | 20 ++++++------ .../View/PIRoomPhotoAlbumItemVC.m | 4 +-- .../SubViews/PIRoomPhotoAlbumChooseGiftView.m | 4 +-- .../PIRoomPhotoAlbumChoosePhotoView.m | 6 ++-- .../SubViews/PIRoomPhotoAlbumOperateView.m | 2 +- .../View/Sailing/View/XPSailingPrizeView.m | 2 +- .../View/Sailing/View/XPSailingRankSubView.m | 2 +- .../Sailing/View/XPSailingViewController.m | 4 +-- .../SendGiftView/Presenter/XPGiftStorage.m | 2 +- .../Cell/XPGiftWeekStarCollectionViewCell.m | 4 +-- .../View/PIGiftInfoSegmentedView.m | 12 +++---- .../View/SendGiftView/View/XPGiftCountView.m | 6 ++-- .../SendGiftView/View/XPGiftHeadTypeView.m | 2 +- .../View/SendGiftView/View/XPGiftInfoView.m | 8 ++--- .../View/XPGiftLuckyGiftBroadcastView.m | 2 +- .../View/XPGiftTwelveStarBroadcastView.m | 2 +- .../View/SendGiftView/View/XPGiftUsersView.m | 6 ++-- .../View/SendGiftView/View/XPSendGiftView.m | 2 +- .../Cell/PIRedPacketChooseTypeView.m | 4 +-- .../PIReceiveRedPacketSuccessView.m | 2 +- .../SendRedPacket/PIRoomSendRedPacketItemVC.m | 2 +- .../Presenter/XPRoomSettingPresenter.m | 4 +-- .../View/XPRoomInviteUserViewController.m | 8 ++--- .../Setting/View/XPRoomOnLineViewController.m | 4 +-- .../Setting/View/XPRoomRoleViewController.m | 4 +-- .../View/XPRoomSettingViewController.m | 6 ++-- .../View/Setting/View/XPRoomTagListView.m | 12 +++---- .../View/XPRoomTagListViewController.m | 12 +++---- .../Modules/YMRoom/View/StageView/StageView.m | 6 ++-- .../Cell/XPTreasureFairyTrialsRecordCell.m | 2 +- .../View/View/XPTreasureFailyResultView.m | 2 +- .../View/XPTreasureFairyBallContentView.m | 4 +-- .../View/View/XPTreasureFairyDrawView.m | 12 +++---- .../View/View/XPTreasureFairyFriendView.m | 4 +-- .../View/View/XPTreasureFairyNewSummonView.m | 6 ++-- .../View/XPTreasureFairyPrizeRecordView.m | 2 +- .../View/View/XPTreasureFairyPrizeSubView.m | 2 +- .../View/View/XPTreasureFairySendRecordView.m | 2 +- .../XPTreasureFairyShopingRecordSubView.m | 2 +- .../XPTreasureFairyStoreResultSmallView.m | 4 +-- .../View/XPTreasureFairyStoreResultView.m | 4 +-- .../View/View/XPTreasureFairyStoreView.m | 4 +-- .../View/View/XPTreasureFairySummonView.m | 12 +++---- .../View/XPTreasureFairyTrialsContentView.m | 32 +++++++++---------- .../View/XPTreasureFairyTrialsRecordView.m | 2 +- .../View/XPTreasureFairyViewController.m | 2 +- .../View/SubViews/XPUserCardSkillCardView.m | 4 +-- .../UserCard/View/XPUserCardViewController.m | 4 +-- .../WishGift/View/View/XPWishGiftEnterView.m | 2 +- .../WishGift/View/View/XPWishGiftListView.m | 4 +-- .../View/XPWishGiftCreateItemViewController.m | 4 +-- .../View/XPWishGiftCreateViewController.m | 2 +- .../View/XPWishGiftHistoryViewController.m | 8 ++--- .../WishGift/View/XPWishGiftViewController.m | 8 ++--- YuMi/Modules/YMRoom/View/XPMiniRoomView.m | 6 ++-- .../YMRoom/View/XPRoomViewController.m | 2 +- .../View/AnchorCard/XPAnchorCardView.m | 6 ++-- YuMi/Tools/File/UploadFile.m | 6 ++-- YuMi/Tools/Safe/NSArray+Safe.h | 2 +- YuMi/Tools/Safe/NSArray+Safe.m | 2 +- YuMi/Tools/sdkContent/content/K/BSDrawLine.m | 6 ++-- 210 files changed, 529 insertions(+), 527 deletions(-) diff --git a/YuMi/CustomUI/InputView/InputView/QEmotionHelper.m b/YuMi/CustomUI/InputView/InputView/QEmotionHelper.m index e114920b..d5222d7c 100644 --- a/YuMi/CustomUI/InputView/InputView/QEmotionHelper.m +++ b/YuMi/CustomUI/InputView/InputView/QEmotionHelper.m @@ -114,7 +114,7 @@ //把 @@"[微笑]", 转为 @"😊" - (NSAttributedString *)obtainAttributedStringByImageKey:(NSString *)imageKey font:(UIFont *)font useCache:(BOOL)useCache { if([self.emojiHantList containsObject:imageKey]){ - NSString *getImageKey = [self.emojiHansList safeObjectAtIndex1:[self.emojiHantList indexOfObject:imageKey]]; + NSString *getImageKey = [self.emojiHansList xpSafeObjectAtIndex:[self.emojiHantList indexOfObject:imageKey]]; if(getImageKey != nil){ imageKey = getImageKey; } diff --git a/YuMi/CustomUI/InputView/InputView/QinputPhotoView.m b/YuMi/CustomUI/InputView/InputView/QinputPhotoView.m index a0b74e5c..3d5a468e 100644 --- a/YuMi/CustomUI/InputView/InputView/QinputPhotoView.m +++ b/YuMi/CustomUI/InputView/InputView/QinputPhotoView.m @@ -95,7 +95,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { QInputPhototCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([QInputPhototCell class]) forIndexPath:indexPath]; -QPhotoImageModel * imageInfo = [self.photoList safeObjectAtIndex1:indexPath.row]; +QPhotoImageModel * imageInfo = [self.photoList xpSafeObjectAtIndex:indexPath.row]; cell.imageInfo = imageInfo; cell.delegate = self; return cell; diff --git a/YuMi/CustomUI/ShareView/XPShareView.m b/YuMi/CustomUI/ShareView/XPShareView.m index af630a59..504218ae 100644 --- a/YuMi/CustomUI/ShareView/XPShareView.m +++ b/YuMi/CustomUI/ShareView/XPShareView.m @@ -114,7 +114,7 @@ } - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ XPShareItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPShareItemCell class]) forIndexPath:indexPath]; - XPShareItem * item = [self.items safeObjectAtIndex1:indexPath.item]; + XPShareItem * item = [self.items xpSafeObjectAtIndex:indexPath.item]; item.disable = YES; cell.shareItem = item; return cell; @@ -134,7 +134,7 @@ NSString *encodedUrl = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; - XPShareItem * item = [self.items safeObjectAtIndex1:indexPath.item]; + XPShareItem * item = [self.items xpSafeObjectAtIndex:indexPath.item]; if (item == nil){ [TTPopup dismiss]; return; diff --git a/YuMi/Modules/YMMessage/View/FindNew/View/View/XPSessionFindNewGreetListView.m b/YuMi/Modules/YMMessage/View/FindNew/View/View/XPSessionFindNewGreetListView.m index d259761b..9a8b1b78 100644 --- a/YuMi/Modules/YMMessage/View/FindNew/View/View/XPSessionFindNewGreetListView.m +++ b/YuMi/Modules/YMMessage/View/FindNew/View/View/XPSessionFindNewGreetListView.m @@ -133,7 +133,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { XPSessionFindNewGreetTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPSessionFindNewGreetTableViewCell class])]; - FindNewGreetModel * model = [self.datasource safeObjectAtIndex1:indexPath.row]; + FindNewGreetModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (model.fId == self.selectModel.fId) { model.isSelect = YES; } else { @@ -146,7 +146,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - FindNewGreetModel * model = [self.datasource safeObjectAtIndex1:indexPath.row]; + FindNewGreetModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; self.selectModel = model; [self.tableView reloadData]; } diff --git a/YuMi/Modules/YMMessage/View/FindNew/View/XPSessionFindNewViewController.m b/YuMi/Modules/YMMessage/View/FindNew/View/XPSessionFindNewViewController.m index 73c581f6..f9367506 100644 --- a/YuMi/Modules/YMMessage/View/FindNew/View/XPSessionFindNewViewController.m +++ b/YuMi/Modules/YMMessage/View/FindNew/View/XPSessionFindNewViewController.m @@ -96,7 +96,7 @@ if (cell == nil) { cell = [[XPSessionFindNewTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPSessionFindNewTableViewCell class])]; } - cell.userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } @@ -150,7 +150,7 @@ ///兼容房间内私聊的 UIWindow * currentWindow; for (int i = 0; i < [UIApplication sharedApplication].windows.count; i++) { - UIWindow * window = [[UIApplication sharedApplication].windows safeObjectAtIndex1:i]; + UIWindow * window = [[UIApplication sharedApplication].windows xpSafeObjectAtIndex:i]; if(window.tag == 1000) { currentWindow = window; break; @@ -203,7 +203,7 @@ ///兼容房间内私聊的 UIWindow * currentWindow; for (int i = 0; i < [UIApplication sharedApplication].windows.count; i++) { - UIWindow * window = [[UIApplication sharedApplication].windows safeObjectAtIndex1:i]; + UIWindow * window = [[UIApplication sharedApplication].windows xpSafeObjectAtIndex:i]; if(window.tag == 1000) { currentWindow = window; break; diff --git a/YuMi/Modules/YMMessage/View/SayHello/View/XPSessionSayHelloViewController.m b/YuMi/Modules/YMMessage/View/SayHello/View/XPSessionSayHelloViewController.m index ee0b351d..16a78ec2 100644 --- a/YuMi/Modules/YMMessage/View/SayHello/View/XPSessionSayHelloViewController.m +++ b/YuMi/Modules/YMMessage/View/SayHello/View/XPSessionSayHelloViewController.m @@ -180,7 +180,7 @@ if (cell == nil) { cell = [[XPSessionSayHelloTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPSessionSayHelloTableViewCell class])]; } - SessionSayHelloListModel * model = [self.datasource safeObjectAtIndex1:indexPath.row]; + SessionSayHelloListModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.shuntInfo = model; cell.delegate = self; return cell; diff --git a/YuMi/Modules/YMMessage/View/Session/Cell/SessionUserInfoTableViewCell.m b/YuMi/Modules/YMMessage/View/Session/Cell/SessionUserInfoTableViewCell.m index 5212bd4c..3c2097e7 100644 --- a/YuMi/Modules/YMMessage/View/Session/Cell/SessionUserInfoTableViewCell.m +++ b/YuMi/Modules/YMMessage/View/Session/Cell/SessionUserInfoTableViewCell.m @@ -213,7 +213,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { SessionUserInfoCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([SessionUserInfoCell class]) forIndexPath:indexPath]; - UserPhoto * photo = [self.userInfo.privatePhoto safeObjectAtIndex1:indexPath.row]; + UserPhoto * photo = [self.userInfo.privatePhoto xpSafeObjectAtIndex:indexPath.row]; cell.avatarImageView.imageUrl = photo.photoUrl; return cell; } @@ -235,7 +235,7 @@ #pragma mark - SDPhotoBrowserDelegate - (NSURL *)photoBrowser:(SDPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index { - UserPhoto * photo = [self.userInfo.privatePhoto safeObjectAtIndex1:index]; + UserPhoto * photo = [self.userInfo.privatePhoto xpSafeObjectAtIndex:index]; return [NSURL URLWithString:photo.photoUrl]; } diff --git a/YuMi/Modules/YMMessage/View/Session/MSSessionPublicChatHallVC.m b/YuMi/Modules/YMMessage/View/Session/MSSessionPublicChatHallVC.m index fc26fd0b..a4041c7f 100644 --- a/YuMi/Modules/YMMessage/View/Session/MSSessionPublicChatHallVC.m +++ b/YuMi/Modules/YMMessage/View/Session/MSSessionPublicChatHallVC.m @@ -525,7 +525,7 @@ - (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { - MessageBaseModel * message = [self.messages safeObjectAtIndex1:indexPath.row]; + MessageBaseModel * message = [self.messages xpSafeObjectAtIndex:indexPath.row]; MessageHeadlinesTextModel * textModel = (MessageHeadlinesTextModel *)message; if(message.messageType == SessionMessageType_Text){ @@ -560,14 +560,14 @@ cell = [tableView dequeueReusableCellWithIdentifier:identifier]; } cell.delegate = self; - [cell renderWithMessage:[self.messages safeObjectAtIndex1:indexPath.row]]; + [cell renderWithMessage:[self.messages xpSafeObjectAtIndex:indexPath.row]]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ - MessageBaseModel *m = [self.messages safeObjectAtIndex1:indexPath.row]; + MessageBaseModel *m = [self.messages xpSafeObjectAtIndex:indexPath.row]; NSLog(@"%@",m.message.remoteExt); } - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { @@ -937,7 +937,7 @@ #pragma mark - QinputPhotoViewDelegate - (void)qinputPhotoView:(QinputPhotoView *)view didClickSend:(NSArray *)photoList { for (int i = 0; i < photoList.count; i++) { - QPhotoImageModel * imageInfo = [photoList safeObjectAtIndex1:i]; + QPhotoImageModel * imageInfo = [photoList xpSafeObjectAtIndex:i]; UIImage * image; if (view.isOrigin) { image = imageInfo.originImage; diff --git a/YuMi/Modules/YMMessage/View/Session/SessionInfoViewController.m b/YuMi/Modules/YMMessage/View/Session/SessionInfoViewController.m index e5d12fb9..c4682167 100644 --- a/YuMi/Modules/YMMessage/View/Session/SessionInfoViewController.m +++ b/YuMi/Modules/YMMessage/View/Session/SessionInfoViewController.m @@ -77,7 +77,7 @@ if (cell == nil) { cell = [[SessionSettingTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([SessionSettingTableViewCell class])]; } - SessionSettingModel * model= [self.datasource safeObjectAtIndex1:indexPath.row]; + SessionSettingModel * model= [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.chatItem = model; cell.delegate = self; return cell; @@ -86,7 +86,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - SessionSettingModel * model = [self.datasource safeObjectAtIndex1:indexPath.row]; + SessionSettingModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (model.settingType == SessionSettingType_report) { [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEvent_chat_set_report_click]; XPWebViewController *webVC = [[XPWebViewController alloc] init]; @@ -114,7 +114,7 @@ NIMStickTopSessionInfo * topInfo; NIMSession * topSession; for (int i = 0; i < self.stickTopMessages.allKeys.count; i++) { - NIMSession * session = [self.stickTopMessages.allKeys safeObjectAtIndex1:i]; + NIMSession * session = [self.stickTopMessages.allKeys xpSafeObjectAtIndex:i]; if (session.sessionId == self.session.sessionId) { topSession = session; break; @@ -218,7 +218,7 @@ topModel.settingType = SessionSettingType_Top; NIMSession * topSession; for (int i = 0; i < self.stickTopMessages.allKeys.count; i++) { - NIMSession * session = [self.stickTopMessages.allKeys safeObjectAtIndex1:i]; + NIMSession * session = [self.stickTopMessages.allKeys xpSafeObjectAtIndex:i]; if (session.sessionId == self.session.sessionId) { topSession = session; break; diff --git a/YuMi/Modules/YMMessage/View/Session/SessionViewController.m b/YuMi/Modules/YMMessage/View/Session/SessionViewController.m index 327d83ad..21b4f9cf 100644 --- a/YuMi/Modules/YMMessage/View/Session/SessionViewController.m +++ b/YuMi/Modules/YMMessage/View/Session/SessionViewController.m @@ -160,11 +160,11 @@ [self.sessionTableView.mj_header endRefreshing]; if (error == nil && messages.count > 0) { for (int i = ((int)messages.count -1); i >= 0; i--) { - NIMMessage * message = [messages safeObjectAtIndex1:i]; + NIMMessage * message = [messages xpSafeObjectAtIndex:i]; MessageBaseModel * model = [self modeTransformMessage:message]; [self.messages insertObject:model atIndex:0]; if ((i -1) > 0) { - NIMMessage * message1 = [messages safeObjectAtIndex1:i -1]; + NIMMessage * message1 = [messages xpSafeObjectAtIndex:i -1]; CGFloat dur = message.timestamp - message1.timestamp; if (dur / 60 > 5) { MessageBaseModel * timeModel = [self createTimeMessage:message]; @@ -180,10 +180,10 @@ [self.sessionTableView.mj_header endRefreshing]; if (error == nil) { for (int i = 0; i < messages.count; i++) { - NIMMessage * message = [messages safeObjectAtIndex1:i]; + NIMMessage * message = [messages xpSafeObjectAtIndex:i]; MessageBaseModel * model = [self modeTransformMessage:message]; if ((i + 1) < messages.count) { - NIMMessage * message1 = [messages safeObjectAtIndex1:i + 1]; + NIMMessage * message1 = [messages xpSafeObjectAtIndex:i + 1]; CGFloat dur = message1.timestamp - message.timestamp; if (dur / 60 > 5) { MessageBaseModel * timeModel = [self createTimeMessage:message]; @@ -522,7 +522,7 @@ - (void)deleteMessageSuccess:(NIMMessage *)message { MessageBaseModel * revokeMessage; for (int i = 0; i < self.messages.count; i++) { - MessageBaseModel * message1 = [self.messages safeObjectAtIndex1:i]; + MessageBaseModel * message1 = [self.messages xpSafeObjectAtIndex:i]; if ([message.messageId isEqualToString: message1.message.messageId]) { revokeMessage = message1; break; @@ -537,7 +537,7 @@ - (void)revokeMessageSuccess:(NIMMessage *)message { MessageBaseModel * revokeMessage; for (int i = 0; i < self.messages.count; i++) { - MessageBaseModel * message1 = [self.messages safeObjectAtIndex1:i]; + MessageBaseModel * message1 = [self.messages xpSafeObjectAtIndex:i]; if ([message.messageId isEqualToString:message1.message.messageId]) { revokeMessage = message1; break; @@ -641,7 +641,7 @@ cell.delegate = self; return cell; } else { - MessageBaseModel * message = [self.messages safeObjectAtIndex1:indexPath.row]; + MessageBaseModel * message = [self.messages xpSafeObjectAtIndex:indexPath.row]; NSString * identifier = [message cellContent:message]; ///从复用池中获取所需要的cell MessageCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier]; @@ -652,7 +652,7 @@ cell = [tableView dequeueReusableCellWithIdentifier:identifier]; } cell.delegate = self; - [cell renderWithMessage:[self.messages safeObjectAtIndex1:indexPath.row]]; + [cell renderWithMessage:[self.messages xpSafeObjectAtIndex:indexPath.row]]; return cell; } } @@ -661,7 +661,7 @@ if (indexPath.section == 0) { return self.userInfo.privatePhoto.count > 0 ? 182 : 100; } - MessageBaseModel *msg = [self.messages safeObjectAtIndex1:indexPath.row]; + MessageBaseModel *msg = [self.messages xpSafeObjectAtIndex:indexPath.row]; return msg.height; } @@ -727,7 +727,7 @@ - (void)onRecvRevokeMessageNotification:(NIMRevokeMessageNotification *)notification { MessageBaseModel * revokeMessage; for (int i = 0; i < self.messages.count; i++) { - MessageBaseModel * message1 = [self.messages safeObjectAtIndex1:i]; + MessageBaseModel * message1 = [self.messages xpSafeObjectAtIndex:i]; if ([notification.message.messageId isEqualToString:message1.message.messageId]) { revokeMessage = message1; break; @@ -1058,7 +1058,7 @@ #pragma mark - QinputPhotoViewDelegate - (void)qinputPhotoView:(QinputPhotoView *)view didClickSend:(NSArray *)photoList { for (int i = 0; i < photoList.count; i++) { - QPhotoImageModel * imageInfo = [photoList safeObjectAtIndex1:i]; + QPhotoImageModel * imageInfo = [photoList xpSafeObjectAtIndex:i]; UIImage * image; if (view.isOrigin) { image = imageInfo.originImage; diff --git a/YuMi/Modules/YMMessage/View/Session/View/MSSessionScrollingView.m b/YuMi/Modules/YMMessage/View/Session/View/MSSessionScrollingView.m index c2dce84b..68db8e82 100644 --- a/YuMi/Modules/YMMessage/View/Session/View/MSSessionScrollingView.m +++ b/YuMi/Modules/YMMessage/View/Session/View/MSSessionScrollingView.m @@ -64,7 +64,7 @@ static const CGFloat ktimerSec = 0.01; return cell; } MSSessionScrollingItemCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([MSSessionScrollingItemCell class]) forIndexPath:indexPath]; - cell.model = [self.modelList safeObjectAtIndex1:indexPath.row-1]; + cell.model = [self.modelList xpSafeObjectAtIndex:indexPath.row-1]; return cell; } @@ -77,7 +77,7 @@ static const CGFloat ktimerSec = 0.01; return CGSizeMake(KScreenWidth, kGetScaleWidth(80)); } - MSSessionScrollingModel *model = [self.modelList safeObjectAtIndex1:indexPath.row-1]; + MSSessionScrollingModel *model = [self.modelList xpSafeObjectAtIndex:indexPath.row-1]; return CGSizeMake(model.width + kGetScaleWidth(32.5), kGetScaleWidth(27)); } diff --git a/YuMi/Modules/YMMessage/View/SessionList/SessionListViewController.m b/YuMi/Modules/YMMessage/View/SessionList/SessionListViewController.m index 81eb84f4..e053027e 100644 --- a/YuMi/Modules/YMMessage/View/SessionList/SessionListViewController.m +++ b/YuMi/Modules/YMMessage/View/SessionList/SessionListViewController.m @@ -200,7 +200,7 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey"; - (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewRowAction * deleteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:YMLocalizedString(@"SessionListViewController0") handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) { - NIMRecentSession * session = [self.recentSessions safeObjectAtIndex1:indexPath.row]; + NIMRecentSession * session = [self.recentSessions xpSafeObjectAtIndex:indexPath.row]; [[NIMSDK sharedSDK].conversationManager deleteRecentSession:session]; }]; deleteAction.title = YMLocalizedString(@"SessionListViewController1"); @@ -236,7 +236,7 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey"; if (!cell) { cell = [[SessionListCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId]; } - NIMRecentSession *recent = [self.recentSessions safeObjectAtIndex1:indexPath.row]; + NIMRecentSession *recent = [self.recentSessions xpSafeObjectAtIndex:indexPath.row]; [cell renderWithSession:recent]; return cell; } diff --git a/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.m b/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.m index 3a501056..f1a25f0f 100644 --- a/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.m +++ b/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.m @@ -173,7 +173,7 @@ self.secondPhotoImageView.hidden = YES; self.thirdPhotoImageView.hidden = YES; for (int i = 0; i < array.count; i++) { - NetImageView * imageView = [self.photoViewArray safeObjectAtIndex1:i]; + NetImageView * imageView = [self.photoViewArray xpSafeObjectAtIndex:i]; NSString * imageUrl = [array objectAtIndex:i].photoUrl; if (imageUrl.length > 0) { imageView.imageUrl = imageUrl; diff --git a/YuMi/Modules/YMMine/View/Cell/XPMineGameTableViewCell.m b/YuMi/Modules/YMMine/View/Cell/XPMineGameTableViewCell.m index 7907c301..d33bc1f3 100644 --- a/YuMi/Modules/YMMine/View/Cell/XPMineGameTableViewCell.m +++ b/YuMi/Modules/YMMine/View/Cell/XPMineGameTableViewCell.m @@ -73,7 +73,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPMIneGameCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMIneGameCollectionViewCell class]) forIndexPath:indexPath]; - LittleGameInfoModel * item = [self.datasource safeObjectAtIndex1:indexPath.row]; + LittleGameInfoModel * item = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.gameModel = item; return cell; } @@ -81,7 +81,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineGameTableViewCell:didSelectItem:)]) { - LittleGameInfoModel * model = [self.datasource safeObjectAtIndex1:indexPath.row]; + LittleGameInfoModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; [self.delegate xPMineGameTableViewCell:self didSelectItem:model]; } } diff --git a/YuMi/Modules/YMMine/View/Cell/XPMineHeadItemTableViewCell.m b/YuMi/Modules/YMMine/View/Cell/XPMineHeadItemTableViewCell.m index 05becd18..2c85da2a 100644 --- a/YuMi/Modules/YMMine/View/Cell/XPMineHeadItemTableViewCell.m +++ b/YuMi/Modules/YMMine/View/Cell/XPMineHeadItemTableViewCell.m @@ -62,7 +62,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPMineHeadItemCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMineHeadItemCollectionViewCell class]) forIndexPath:indexPath]; - XPMineFuntionItemModel * item = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMineFuntionItemModel * item = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.itemModel = item; return cell; } @@ -70,7 +70,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineHeadItemTableViewCell:didSelectItem:)]) { - XPMineFuntionItemModel * model = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMineFuntionItemModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; [self.delegate xPMineHeadItemTableViewCell:self didSelectItem:model]; } } diff --git a/YuMi/Modules/YMMine/View/CollectRoom/XPMineCollectPartyRoomViewController.m b/YuMi/Modules/YMMine/View/CollectRoom/XPMineCollectPartyRoomViewController.m index dbdd9738..7149f850 100644 --- a/YuMi/Modules/YMMine/View/CollectRoom/XPMineCollectPartyRoomViewController.m +++ b/YuMi/Modules/YMMine/View/CollectRoom/XPMineCollectPartyRoomViewController.m @@ -139,14 +139,14 @@ if (cell == nil) { cell = [[XPMineCollectRoomEditCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineCollectRoomEditCell class])]; } - cell.roomInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.roomInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } else { XPMineCollectRoomCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineCollectRoomCell class])]; if (cell == nil) { cell = [[XPMineCollectRoomCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineCollectRoomCell class])]; } - cell.roomInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.roomInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } } @@ -164,7 +164,7 @@ } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - HomeCollectRoomModel * roomInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + HomeCollectRoomModel * roomInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (self.isEdit) { roomInfo.isSelected = !roomInfo.isSelected; [tableView reloadData]; diff --git a/YuMi/Modules/YMMine/View/DressUp/View/XPDressSearchViewController.m b/YuMi/Modules/YMMine/View/DressUp/View/XPDressSearchViewController.m index 20cafd8f..06fef0b0 100644 --- a/YuMi/Modules/YMMine/View/DressUp/View/XPDressSearchViewController.m +++ b/YuMi/Modules/YMMine/View/DressUp/View/XPDressSearchViewController.m @@ -92,7 +92,7 @@ if (cell == nil) { cell = [[XPDressShopSearchTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPDressShopSearchTableViewCell class])]; } - HomeSearchResultModel * resultModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + HomeSearchResultModel * resultModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.data = resultModel; cell.delegate = self; cell.selectionStyle = UITableViewCellSelectionStyleNone; @@ -106,7 +106,7 @@ #pragma mark - XPDressShopSearchTableViewCellDelegate - (void)xPDressShopSearchTableViewCellSendButtonClick:(XPDressShopSearchTableViewCell *)cell { NSIndexPath *indexPath = [self.tableView indexPathForCell:cell]; - HomeSearchResultModel * resultModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + HomeSearchResultModel * resultModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; [self showLoading]; [Api requestSendDress:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { [self hideHUD]; diff --git a/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopCardViewController.m b/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopCardViewController.m index be4f7f85..a5d6a3fe 100644 --- a/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopCardViewController.m +++ b/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopCardViewController.m @@ -155,7 +155,7 @@ if (cell == nil) { cell = [[XPDressUpShopCardTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPDressUpShopCardTableViewCell class])]; } - cell.nobleCardModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.nobleCardModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } diff --git a/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopListViewController.m b/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopListViewController.m index 3f6c8ef9..8dd58113 100644 --- a/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopListViewController.m +++ b/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopListViewController.m @@ -146,7 +146,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { XPDressUpShopCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPDressUpShopCollectionViewCell class]) forIndexPath:indexPath]; - cell.dressUpModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.dressUpModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } diff --git a/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopViewController.m b/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopViewController.m index afcbe4ce..1ce1ca78 100644 --- a/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopViewController.m +++ b/YuMi/Modules/YMMine/View/DressUp/View/XPDressUpShopViewController.m @@ -221,7 +221,7 @@ #pragma mark - SDCycleScrollViewDelegate - (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { if (self.activityList.count > index) { - ActivityInfoModel * info = [self.activityList safeObjectAtIndex1:index]; + ActivityInfoModel * info = [self.activityList xpSafeObjectAtIndex:index]; if (info.skipType == ActivitySkipType_Room) { [XPRoomViewController openRoom:info.skipUri viewController:self.navigationController]; } else if(info.skipType == ActivitySkipType_Web) { diff --git a/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpBubbleViewController.m b/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpBubbleViewController.m index 71f2035f..a9bc99b5 100644 --- a/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpBubbleViewController.m +++ b/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpBubbleViewController.m @@ -94,7 +94,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { XPMineDressBubbleCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMineDressBubbleCollectionViewCell class]) forIndexPath:indexPath]; - cell.bubbleModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.bubbleModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } diff --git a/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpListViewController.m b/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpListViewController.m index 77694135..cd891173 100644 --- a/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpListViewController.m +++ b/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpListViewController.m @@ -152,7 +152,7 @@ if (cell == nil) { cell = [[XPMineHeadwearTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])]; } - cell.headwearModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.headwearModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } else if(self.type == DressUpListType_Car) { @@ -160,7 +160,7 @@ if (cell == nil) { cell = [[XPMineCarTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineCarTableViewCell class])]; } - cell.carInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.carInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } else if (self.type == DressUpListType_Noble) { @@ -168,7 +168,7 @@ if (cell == nil) { cell = [[XPMineNobleCardTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineNobleCardTableViewCell class])]; } - cell.nobleCardModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.nobleCardModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } else { @@ -176,7 +176,7 @@ if (cell == nil) { cell = [[XPMineNameplateTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])]; } - cell.nameplateModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.nameplateModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } diff --git a/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpViewController.m b/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpViewController.m index c529f442..4a0155d5 100644 --- a/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpViewController.m +++ b/YuMi/Modules/YMMine/View/DressUp/View/XPMineDressUpViewController.m @@ -142,7 +142,7 @@ #pragma mark - SDCycleScrollViewDelegate - (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { if (self.activityList.count > index) { - ActivityInfoModel * info = [self.activityList safeObjectAtIndex1:index]; + ActivityInfoModel * info = [self.activityList xpSafeObjectAtIndex:index]; if (info.skipType == ActivitySkipType_Room) { [XPRoomViewController openRoom:info.skipUri viewController:self.navigationController]; } else if(info.skipType == ActivitySkipType_Web) { diff --git a/YuMi/Modules/YMMine/View/Friend/XPMineAttentionViewController.m b/YuMi/Modules/YMMine/View/Friend/XPMineAttentionViewController.m index f84b077c..7c6bb68f 100644 --- a/YuMi/Modules/YMMine/View/Friend/XPMineAttentionViewController.m +++ b/YuMi/Modules/YMMine/View/Friend/XPMineAttentionViewController.m @@ -147,7 +147,7 @@ cell = [[XPMineAttentionTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineAttentionTableViewCell class])]; } cell.delegate = self; - FansInfoModel * fansInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + FansInfoModel * fansInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; fansInfo.useingType = self.type; cell.fansInfo = fansInfo; return cell; @@ -164,7 +164,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - FansInfoModel * fansInfoModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + FansInfoModel * fansInfoModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (self.type == ContactUseingType_In_Room) { SessionViewController * sessionVC = [[SessionViewController alloc] initWithSession:[NIMSession session:fansInfoModel.uid type:NIMSessionTypeP2P]]; sessionVC.openType = SessionListOpenTypeRoom; diff --git a/YuMi/Modules/YMMine/View/Friend/XPMineFansViewController.m b/YuMi/Modules/YMMine/View/Friend/XPMineFansViewController.m index b7757e93..33252998 100644 --- a/YuMi/Modules/YMMine/View/Friend/XPMineFansViewController.m +++ b/YuMi/Modules/YMMine/View/Friend/XPMineFansViewController.m @@ -159,7 +159,7 @@ cell = [[XPMineFansTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineFansTableViewCell class])]; } cell.delegate = self; - FansInfoModel * fansInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + FansInfoModel * fansInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; fansInfo.useingType = self.type; cell.fansInfo = fansInfo; return cell; @@ -176,7 +176,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - FansInfoModel * fansInfoModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + FansInfoModel * fansInfoModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (self.type == ContactUseingType_In_Room) { SessionViewController * sessionVC = [[SessionViewController alloc] initWithSession:[NIMSession session:fansInfoModel.uid type:NIMSessionTypeP2P]]; sessionVC.openType = SessionListOpenTypeRoom; diff --git a/YuMi/Modules/YMMine/View/Friend/XPMineFriendViewController.m b/YuMi/Modules/YMMine/View/Friend/XPMineFriendViewController.m index d9ffa645..592fbcec 100644 --- a/YuMi/Modules/YMMine/View/Friend/XPMineFriendViewController.m +++ b/YuMi/Modules/YMMine/View/Friend/XPMineFriendViewController.m @@ -50,7 +50,7 @@ if (array.count > 0) { NSMutableArray * uids = [NSMutableArray array]; for (int i = 0; i< array.count; i++) { - NIMUser * user = [array safeObjectAtIndex1:i]; + NIMUser * user = [array xpSafeObjectAtIndex:i]; [uids addObject:user.userId]; } [self.presenter getUserListInfo:uids]; @@ -89,7 +89,7 @@ if (cell == nil) { cell = [[XPMineFriendTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineFriendTableViewCell class])]; } - cell.userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } @@ -104,7 +104,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - UserInfoModel * userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + UserInfoModel * userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (self.type == ContactUseingType_Share) { if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineFriendViewController:didSelectItem:)]) { [self.delegate xPMineFriendViewController:self didSelectItem:userInfo]; diff --git a/YuMi/Modules/YMMine/View/Friend/XPRoomMessageBubbleView.m b/YuMi/Modules/YMMine/View/Friend/XPRoomMessageBubbleView.m index 3492d42d..3c65b86d 100644 --- a/YuMi/Modules/YMMine/View/Friend/XPRoomMessageBubbleView.m +++ b/YuMi/Modules/YMMine/View/Friend/XPRoomMessageBubbleView.m @@ -170,13 +170,13 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPRoomMessageBubbleCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPRoomMessageBubbleCollectionViewCell class]) forIndexPath:indexPath]; - cell.session = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.session = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomMessageBubbleView:didSelectSession:)]) { - NIMRecentSession * session = [self.datasource safeObjectAtIndex1:indexPath.row]; + NIMRecentSession * session = [self.datasource xpSafeObjectAtIndex:indexPath.row]; [self.delegate xPRoomMessageBubbleView:self didSelectSession:session]; [self animationFinish]; } diff --git a/YuMi/Modules/YMMine/View/GiveDiamond/View/XPMineGiveDiamondVC.m b/YuMi/Modules/YMMine/View/GiveDiamond/View/XPMineGiveDiamondVC.m index ae2c8022..93a4bcb9 100644 --- a/YuMi/Modules/YMMine/View/GiveDiamond/View/XPMineGiveDiamondVC.m +++ b/YuMi/Modules/YMMine/View/GiveDiamond/View/XPMineGiveDiamondVC.m @@ -104,7 +104,7 @@ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ if(self.datasource.count > 0){ XPMineGiveDiamondCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineGiveDiamondCell class]) forIndexPath:indexPath]; - cell.giveDiamondModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.giveDiamondModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } XPMineFriendEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])forIndexPath:indexPath] ; @@ -117,7 +117,7 @@ if(self.datasource.count < indexPath.row)return; XPMineGiveDiamondDetailsVC *vc = [[XPMineGiveDiamondDetailsVC alloc]init]; vc.userInfo = self.userInfo; - XPMineGiveDiamondModel *model = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMineGiveDiamondModel *model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; vc.toUid = model.targetUid; [self.navigationController pushViewController:vc animated:YES]; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/Cell/SuperAdmin/XPGuildSuperAdminSetTableViewCell.m b/YuMi/Modules/YMMine/View/Guild/View/Cell/SuperAdmin/XPGuildSuperAdminSetTableViewCell.m index 392e24cf..68c44f5c 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/Cell/SuperAdmin/XPGuildSuperAdminSetTableViewCell.m +++ b/YuMi/Modules/YMMine/View/Guild/View/Cell/SuperAdmin/XPGuildSuperAdminSetTableViewCell.m @@ -123,7 +123,7 @@ -(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPGuildSuperAdminRoomCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPGuildSuperAdminRoomCollectionViewCell class]) forIndexPath:indexPath]; - GuildRoomInfoModel * roomInfo = [self.managerInfo.roomList safeObjectAtIndex1:indexPath.row]; + GuildRoomInfoModel * roomInfo = [self.managerInfo.roomList xpSafeObjectAtIndex:indexPath.row]; cell.roomInfo = roomInfo; return cell; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGuildIncomeDetailViewController.m b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGuildIncomeDetailViewController.m index 50dcd26c..857be4f0 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGuildIncomeDetailViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGuildIncomeDetailViewController.m @@ -104,7 +104,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { if (self.datasouce.count > 0) { XPGuildIncomeDetailCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPGuildIncomeDetailCollectionViewCell class]) forIndexPath:indexPath]; - cell.incomeDetailInfo= [self.datasouce safeObjectAtIndex1:indexPath.row]; + cell.incomeDetailInfo= [self.datasouce xpSafeObjectAtIndex:indexPath.row]; return cell; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGuildIncomeRecordViewController.m b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGuildIncomeRecordViewController.m index d7062c4a..2947650a 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGuildIncomeRecordViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGuildIncomeRecordViewController.m @@ -185,18 +185,18 @@ cell = [[XPGuildIncomeRecordTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPGuildIncomeRecordTableViewCell class])]; } cell.rankNumber = indexPath.row; - cell.userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } else if(self.incomeType == GuildIncomeType_Hall) { XPGuildPersonIncomeTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPGuildPersonIncomeTableViewCell class])]; if (cell == nil) { cell = [[XPGuildPersonIncomeTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPGuildPersonIncomeTableViewCell class])]; } - cell.userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } else if(self.incomeType == GuildIncomeType_Anchor) { PIGuildSingleRoomIncomeCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([PIGuildSingleRoomIncomeCell class])]; - cell.userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } } @@ -244,7 +244,7 @@ [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.incomeType == GuildIncomeType_Hall) { if (self.datasource.count > 0) { - GuildPersonIncomeUserInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + GuildPersonIncomeUserInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; XPMineGuildIncomeDetailViewController * incomeDetailVC = [[XPMineGuildIncomeDetailViewController alloc] init]; incomeDetailVC.hallId = self.guidId; incomeDetailVC.startTime = self.pi_startTimeStr; diff --git a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineGuildIncomeRecordViewController.m b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineGuildIncomeRecordViewController.m index db549ac5..7181726e 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineGuildIncomeRecordViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineGuildIncomeRecordViewController.m @@ -187,7 +187,7 @@ cell = [[XPGuildIncomeRecordTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPGuildIncomeRecordTableViewCell class])]; } cell.rankNumber = indexPath.row; - cell.userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } else if(self.incomeType == NewGuildIncomeType_Anchor) { XPGuildSingleRoomIncomeTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPGuildSingleRoomIncomeTableViewCell class])]; @@ -195,7 +195,7 @@ cell = [[XPGuildSingleRoomIncomeTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPGuildSingleRoomIncomeTableViewCell class])]; } - cell.userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.rankNumber = indexPath.row; return cell; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineHallIncomeVC.m b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineHallIncomeVC.m index ec37eb1e..0ffa0d38 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineHallIncomeVC.m +++ b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineHallIncomeVC.m @@ -175,7 +175,7 @@ XPNewMineHallIncomeCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPNewMineHallIncomeCell class]) forIndexPath:indexPath]; cell.rankNumber = indexPath.row; - cell.userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } XPMineGuildEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineGuildEmptyTableViewCell class])]; diff --git a/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildManagerPerViewController.m b/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildManagerPerViewController.m index 877d4c1b..988904b5 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildManagerPerViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildManagerPerViewController.m @@ -138,7 +138,7 @@ if (cell == nil) { cell = [[XPMineGuildManagerPerTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineGuildManagerPerTableViewCell class])]; } - GuildAuthModel * authInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + GuildAuthModel * authInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.authInfo = authInfo; cell.delegate = self; if (authInfo.status) { diff --git a/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildManagerSetViewController.m b/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildManagerSetViewController.m index 29d1a538..46d8be91 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildManagerSetViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildManagerSetViewController.m @@ -159,7 +159,7 @@ } cell.delegate = self; cell.cellType = ClanMemberTableViewCellType_Manager_Add_Remove; - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + ClanMemberInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (memberInfo.roleType == GuildRoleType_Manager) { self.managerNumber += 1; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildRemoveMemberViewController.m b/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildRemoveMemberViewController.m index 9fc5f120..892f4373 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildRemoveMemberViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineGuildRemoveMemberViewController.m @@ -136,7 +136,7 @@ } cell.delegate = self; cell.cellType = ClanMemberTableViewCellType_Remove_Member; - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + ClanMemberInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.memberInfo = memberInfo; return cell; } @@ -148,7 +148,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + ClanMemberInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; XPMineUserInfoViewController * mineUserVC = [[XPMineUserInfoViewController alloc] init]; mineUserVC.uid = memberInfo.uid.integerValue; [self.navigationController pushViewController:mineUserVC animated:YES]; diff --git a/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineMangerListViewController.m b/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineMangerListViewController.m index 6b6104ac..a87ae2ce 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineMangerListViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/Setting/XPMineMangerListViewController.m @@ -120,7 +120,7 @@ cell = [[XPClanMemberTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPClanMemberTableViewCell class])]; } cell.cellType = ClanMemberTableViewCellType_Manager_Set; - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + ClanMemberInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.memberInfo = memberInfo; return cell; } @@ -140,7 +140,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + ClanMemberInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; XPMineGuildManagerPerViewController * managerAuthVC = [[XPMineGuildManagerPerViewController alloc] init]; managerAuthVC.guildId = self.guildId; managerAuthVC.managerInfo = memberInfo; diff --git a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildHeaderView.m b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildHeaderView.m index 6053f2fc..ed539340 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildHeaderView.m +++ b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildHeaderView.m @@ -166,7 +166,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPClanRoomCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([ XPClanRoomCollectionViewCell class]) forIndexPath:indexPath]; - cell.guildInfo = [self.clanRoomList safeObjectAtIndex1:indexPath.row]; + cell.guildInfo = [self.clanRoomList xpSafeObjectAtIndex:indexPath.row]; return cell; } @@ -174,7 +174,7 @@ [collectionView deselectItemAtIndexPath:indexPath animated:YES]; if (self.clanRoomList.count > 0) { - GuildInfoModel * guildInfo = [self.clanRoomList safeObjectAtIndex1:indexPath.row]; + GuildInfoModel * guildInfo = [self.clanRoomList xpSafeObjectAtIndex:indexPath.row]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPGuildHeaderView:dicSelectGuild:)]) { [self.delegate xPGuildHeaderView:self dicSelectGuild:guildInfo]; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildTimeMonthPickerView.m b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildTimeMonthPickerView.m index 086c6331..d0145b7f 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildTimeMonthPickerView.m +++ b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildTimeMonthPickerView.m @@ -275,7 +275,7 @@ typedef NS_ENUM(NSInteger,ScrollViewTagValue) { for (int i = 0; i < _days.count; i++) { - NSString *day = (NSString*)[_days safeObjectAtIndex1:i]; + NSString *day = (NSString*)[_days xpSafeObjectAtIndex:i]; UILabel *labelDay = [[UILabel alloc] initWithFrame:CGRectMake(0, (i * kHooDatePickerScrollViewItemHeight) + offsetContentScrollView, _scrollViewDays.frame.size.width, kHooDatePickerScrollViewItemHeight)]; labelDay.text = day; @@ -353,7 +353,7 @@ typedef NS_ENUM(NSInteger,ScrollViewTagValue) { for (int i = 0; i < self.months.count; i++) { - NSString *day = (NSString*)[self.months safeObjectAtIndex1:i]; + NSString *day = (NSString*)[self.months xpSafeObjectAtIndex:i]; UILabel *labelDay = [[UILabel alloc] initWithFrame:CGRectMake(0.0, (i * kHooDatePickerScrollViewItemHeight) + offsetContentScrollView, _scrollViewMonths.frame.size.width, kHooDatePickerScrollViewItemHeight)]; labelDay.text = day; @@ -430,7 +430,7 @@ typedef NS_ENUM(NSInteger,ScrollViewTagValue) { for (int i = 0; i < _years.count; i++) { - NSString *day = (NSString*)[_years safeObjectAtIndex1:i]; + NSString *day = (NSString*)[_years xpSafeObjectAtIndex:i]; UILabel *labelDay = [[UILabel alloc] initWithFrame:CGRectMake(0.0, (i * kHooDatePickerScrollViewItemHeight) + offsetContentScrollView, _scrollViewYears.frame.size.width, kHooDatePickerScrollViewItemHeight)]; labelDay.text = day; @@ -511,7 +511,7 @@ typedef NS_ENUM(NSInteger,ScrollViewTagValue) { for (int i = 0; i < _dates.count; i++) { - NSDate *date = [_dates safeObjectAtIndex1:i]; + NSDate *date = [_dates xpSafeObjectAtIndex:i]; NSString *hour = [dateFormatter stringFromDate:date]; @@ -589,7 +589,7 @@ typedef NS_ENUM(NSInteger,ScrollViewTagValue) { for (int i = 0; i < self.hours.count; i++) { - NSString *hour = (NSString*)[self.hours safeObjectAtIndex1:i]; + NSString *hour = (NSString*)[self.hours xpSafeObjectAtIndex:i]; UILabel *labelHour = [[UILabel alloc] initWithFrame:CGRectMake(0, (i * kHooDatePickerScrollViewItemHeight) + offsetContentScrollView, _scrollViewHours.frame.size.width, kHooDatePickerScrollViewItemHeight)]; labelHour.text = hour; @@ -665,7 +665,7 @@ typedef NS_ENUM(NSInteger,ScrollViewTagValue) { for (int i = 0; i < self.minutes.count; i++) { - NSString *minute = (NSString*)[self.minutes safeObjectAtIndex1:i]; + NSString *minute = (NSString*)[self.minutes xpSafeObjectAtIndex:i]; UILabel *labelMinute = [[UILabel alloc] initWithFrame:CGRectMake(0, (i * kHooDatePickerScrollViewItemHeight) + offsetContentScrollView, _scrollViewMinutes.frame.size.width, kHooDatePickerScrollViewItemHeight)]; labelMinute.text = minute; @@ -741,7 +741,7 @@ typedef NS_ENUM(NSInteger,ScrollViewTagValue) { for (int i = 0; i < self.seconds.count; i++) { - NSString *second = (NSString*)[self.seconds safeObjectAtIndex1:i]; + NSString *second = (NSString*)[self.seconds xpSafeObjectAtIndex:i]; UILabel *labelSecond = [[UILabel alloc] initWithFrame:CGRectMake(0, (i * kHooDatePickerScrollViewItemHeight) + offsetContentScrollView, _scrollViewSeconds.frame.size.width, kHooDatePickerScrollViewItemHeight)]; labelSecond.text = second; @@ -1337,7 +1337,7 @@ typedef NS_ENUM(NSInteger,ScrollViewTagValue) { if (index < 0) return; for (int i = 0; i < labels.count; i++) { - UILabel *label = (UILabel *)[labels safeObjectAtIndex1:i]; + UILabel *label = (UILabel *)[labels xpSafeObjectAtIndex:i]; if (i != index) { label.textColor = self.tintColor; label.font = kHooDatePickerLabelFont; diff --git a/YuMi/Modules/YMMine/View/Guild/View/SuperAdmin/XPMineGuildChooseManagerViewController.m b/YuMi/Modules/YMMine/View/Guild/View/SuperAdmin/XPMineGuildChooseManagerViewController.m index 2e0dd7dd..5b20dda0 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/SuperAdmin/XPMineGuildChooseManagerViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/SuperAdmin/XPMineGuildChooseManagerViewController.m @@ -108,7 +108,7 @@ cell = [[XPGuildChooseManagerRoomTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPGuildChooseManagerRoomTableViewCell class])]; } cell.delegate = self; - GuildRoomInfoModel* roomInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + GuildRoomInfoModel* roomInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.roomInfo = roomInfo; if (roomInfo.hasManage) { if (![self.chooseArray containsObject:roomInfo.hallRoomUid]) { diff --git a/YuMi/Modules/YMMine/View/Guild/View/SuperAdmin/XPMineGuildSuperAdminSetViewController.m b/YuMi/Modules/YMMine/View/Guild/View/SuperAdmin/XPMineGuildSuperAdminSetViewController.m index 642fc9c6..12138a2e 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/SuperAdmin/XPMineGuildSuperAdminSetViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/SuperAdmin/XPMineGuildSuperAdminSetViewController.m @@ -82,7 +82,7 @@ cell = [[XPGuildSuperAdminSetTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPGuildSuperAdminSetTableViewCell class])]; } cell.delegate = self; - GuildSuperAdminInfoModel * info= [self.datasource safeObjectAtIndex1:indexPath.row]; + GuildSuperAdminInfoModel * info= [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.managerInfo = info; return cell; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/XPMineClanViewController.m b/YuMi/Modules/YMMine/View/Guild/View/XPMineClanViewController.m index 8b54cbef..91ee6de7 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/XPMineClanViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/XPMineClanViewController.m @@ -164,7 +164,7 @@ } self.sectionView.title = [NSString stringWithFormat:YMLocalizedString(@"XPMineClanViewController1"), self.memberNum]; cell.cellType = ClanMemberTableViewCellType_Normal; - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row-1]; + ClanMemberInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row-1]; cell.isLast = (self.datasource.count -1) == indexPath.row-1; cell.memberInfo = memberInfo; @@ -200,7 +200,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row-1]; + ClanMemberInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row-1]; XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; userInfoVC.uid = memberInfo.uid.integerValue; [self.navigationController pushViewController:userInfoVC animated:YES]; diff --git a/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildSearchViewController.m b/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildSearchViewController.m index 0bf3a3f0..70d3e4b5 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildSearchViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildSearchViewController.m @@ -101,7 +101,7 @@ cell = [[XPClanMemberTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPClanMemberTableViewCell class])]; } cell.cellType = ClanMemberTableViewCellType_Normal; - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + ClanMemberInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.memberInfo = memberInfo; return cell; }else if(self.searchType == GuildSearchType_Guild_Add_Member) { @@ -110,7 +110,7 @@ cell = [[XPMineGuildSearchMemberTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineGuildSearchMemberTableViewCell class])]; } cell.delegate = self; - GuildSearchUserInfoModel * userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + GuildSearchUserInfoModel * userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.userInfo = userInfo; return cell; } else if(self.searchType == GuildSearchType_Clan_Add_Super_Admin) { @@ -119,7 +119,7 @@ cell = [[XPGuildSearchSuperAdminTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPGuildSearchSuperAdminTableViewCell class])]; } cell.delegate = self; - GuildSearchSuperAdminModel * userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + GuildSearchSuperAdminModel * userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.userInfo = userInfo; return cell; } @@ -145,7 +145,7 @@ switch (self.searchType) { case GuildSearchType_Clan_All_Member: { - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + ClanMemberInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; userInfoVC.uid = memberInfo.uid.integerValue; [((UINavigationController *)self.presentingViewController) pushViewController:userInfoVC animated:YES]; @@ -154,7 +154,7 @@ break; case GuildSearchType_Guild_Add_Member: { - GuildSearchUserInfoModel * userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + GuildSearchUserInfoModel * userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; userInfoVC.uid = userInfo.uid.integerValue; [((UINavigationController *)self.presentingViewController) pushViewController:userInfoVC animated:YES]; diff --git a/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildViewController.m b/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildViewController.m index 06d916ab..0c3112e1 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildViewController.m @@ -341,7 +341,7 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess; cell.pi_IsClan = YES; cell.cellType = ClanMemberTableViewCellType_Normal; cell.pi_IsClan = YES; - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + ClanMemberInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.memberInfo = memberInfo; return cell; } @@ -379,7 +379,7 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess; - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + ClanMemberInfoModel * memberInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; userInfoVC.uid = memberInfo.uid.integerValue; [self.navigationController pushViewController:userInfoVC animated:YES]; diff --git a/YuMi/Modules/YMMine/View/IncomeRecord/XPIncomeRecordGoldDetailsPickViewView.m b/YuMi/Modules/YMMine/View/IncomeRecord/XPIncomeRecordGoldDetailsPickViewView.m index 4c0379de..f5ef791d 100644 --- a/YuMi/Modules/YMMine/View/IncomeRecord/XPIncomeRecordGoldDetailsPickViewView.m +++ b/YuMi/Modules/YMMine/View/IncomeRecord/XPIncomeRecordGoldDetailsPickViewView.m @@ -278,7 +278,7 @@ NSArray * timeArray = [timeStr componentsSeparatedByString:@"-"]; NSMutableArray * timeArr = [[NSMutableArray alloc]init]; for (int i = 0; i 0) { - MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentInfo= [self.datasource xpSafeObjectAtIndex:indexPath.row]; [XPMonentsLayoutConfig getNewlayoutMonentsModelWithDynamic:monentInfo]; if(monentInfo.content.length == 0){ return monentInfo.rowHeight + 20; @@ -152,7 +152,7 @@ if (self.datasource.count > 0) { XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"XPMonentsDynamicTableViewCell" forIndexPath:indexPath]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; cell.mineMonentsInfo = monentsInfo; cell.isFillet = indexPath.row == self.datasource.count - 1; @@ -186,7 +186,7 @@ [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if(monentsInfo.dynamicId == nil){ return; } diff --git a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoAlbumViewController.m b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoAlbumViewController.m index 524c9cfb..d756f623 100644 --- a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoAlbumViewController.m +++ b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoAlbumViewController.m @@ -140,7 +140,7 @@ cell.isEdit = NO; } else { if (self.datasource.count > 0) { - cell.photo = [self.datasource safeObjectAtIndex1:indexPath.row - 1]; + cell.photo = [self.datasource xpSafeObjectAtIndex:indexPath.row - 1]; cell.isEdit = self.isEdit; } } diff --git a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.m b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.m index 51a28235..af0b169d 100644 --- a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.m +++ b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.m @@ -198,7 +198,7 @@ UIKIT_EXTERN NSString * kUpdateSoundInfo; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - XPMineUserInfoEditModel * model = [self.datasouce safeObjectAtIndex1:indexPath.row]; + XPMineUserInfoEditModel * model = [self.datasouce xpSafeObjectAtIndex:indexPath.row]; if (model.type == XPMineUserInfoEditType_Avatar) { return kGetScaleWidth(80); } else { @@ -211,7 +211,7 @@ UIKIT_EXTERN NSString * kUpdateSoundInfo; if (cell == nil) { cell = [[XPMineUserInfoEditTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineUserInfoEditTableViewCell class])]; } - XPMineUserInfoEditModel * model = [self.datasouce safeObjectAtIndex1:indexPath.row]; + XPMineUserInfoEditModel * model = [self.datasouce xpSafeObjectAtIndex:indexPath.row]; if(model.type == XPMineUserInfoEditType_Tag){ cell.itemList = self.tagList; cell.maxWidth = self.maxWidth + self.tagList.count * kGetScaleWidth(5); @@ -227,7 +227,7 @@ UIKIT_EXTERN NSString * kUpdateSoundInfo; - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; - XPMineUserInfoEditModel * model = [self.datasouce safeObjectAtIndex1:indexPath.row]; + XPMineUserInfoEditModel * model = [self.datasouce xpSafeObjectAtIndex:indexPath.row]; switch (model.type) { case XPMineUserInfoEditType_Nick: { diff --git a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoGiftWallSubViewController.m b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoGiftWallSubViewController.m index fef69cda..eec62195 100644 --- a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoGiftWallSubViewController.m +++ b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoGiftWallSubViewController.m @@ -81,7 +81,7 @@ if (indexPath.section == 0 && self.datasource.count > 0){ NSArray *dataList = self.datasource[indexPath.section]; if(indexPath.row < dataList.count){ - cell.giftInfo = [dataList safeObjectAtIndex1:indexPath.row]; + cell.giftInfo = [dataList xpSafeObjectAtIndex:indexPath.row]; [cell setLevel:((int)indexPath.row + 1)]; }else{ UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([UICollectionViewCell class]) forIndexPath:indexPath]; @@ -93,7 +93,7 @@ if (indexPath.section == 1 && self.datasource.count > 1){ NSArray *dataList = self.datasource[indexPath.section]; if(indexPath.row < dataList.count){ - cell.giftInfo = [dataList safeObjectAtIndex1:indexPath.row]; + cell.giftInfo = [dataList xpSafeObjectAtIndex:indexPath.row]; }else{ UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([UICollectionViewCell class]) forIndexPath:indexPath]; diff --git a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m index 0bed83ac..212bc99a 100644 --- a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m +++ b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m @@ -134,7 +134,7 @@ UIKIT_EXTERN NSString * kUpdateSoundInfo; if(not.object != nil){ self.headView.soundModel = not.object; NSString *fileName = [[ self.headView.soundModel.audioUrl componentsSeparatedByString:@"/"] lastObject]; - NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"kMineSoundCard"]; + NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"kMineSoundCard"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if (![[NSFileManager defaultManager] fileExistsAtPath:fullPath]) { NSFileManager *fileMgr = [[NSFileManager alloc] init]; @@ -350,7 +350,7 @@ UIKIT_EXTERN NSString * kUpdateSoundInfo; if(isPlay == YES){ NSString *fileName = [[self.headView.soundModel.audioUrl componentsSeparatedByString:@"/"] lastObject]; - NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"kMineSoundCard"]; + NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"kMineSoundCard"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]) { [self playAudioWithUrl:fullPath isDelay:[XPSkillCardPlayerManager shareInstance].isMineInMic]; @@ -472,7 +472,7 @@ UIKIT_EXTERN NSString * kUpdateSoundInfo; NSString *fileName = [[self.headView.soundModel.audioUrl componentsSeparatedByString:@"/"] lastObject]; - NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"kMineSoundCard"]; + NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"kMineSoundCard"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if (![[NSFileManager defaultManager] fileExistsAtPath:fullPath]) { NSFileManager *fileMgr = [[NSFileManager alloc] init]; diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleView.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleView.m index 33177942..c0f3a852 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleView.m +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleView.m @@ -14,7 +14,7 @@ } - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { PINobleCenterTitleCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([self preferredCellClass]) forIndexPath:indexPath]; - NobleInfo *info = [self.vipInfos safeObjectAtIndex1:indexPath.row]; + NobleInfo *info = [self.vipInfos xpSafeObjectAtIndex:indexPath.row]; cell.info = info; return cell; } diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNoblePrivilegeContentCell.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNoblePrivilegeContentCell.m index f4e9fd69..45058711 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNoblePrivilegeContentCell.m +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNoblePrivilegeContentCell.m @@ -110,7 +110,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPNoblePrivilegeCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(XPNoblePrivilegeCell.class) forIndexPath:indexPath]; - NobleAuthInfo *info = [self.vipAuthInfos safeObjectAtIndex1:indexPath.row]; + NobleAuthInfo *info = [self.vipAuthInfos xpSafeObjectAtIndex:indexPath.row]; if ([self.vipInfo.ownAuthTypes containsObject:@(info.authType)]) { cell.isOwn = YES; }else{ @@ -121,7 +121,7 @@ } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { - NobleAuthInfo *info = [self.vipAuthInfos safeObjectAtIndex1:indexPath.row]; + NobleAuthInfo *info = [self.vipAuthInfos xpSafeObjectAtIndex:indexPath.row]; XPNobleAuthorityDescView *alertView = [[XPNobleAuthorityDescView alloc] initWithFrame:CGRectMake(0, 0, 300, 286)]; alertView.vipInfo = info; TTPopupService * config = [[TTPopupService alloc] init]; diff --git a/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterViewController.m b/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterViewController.m index bc74f656..141e2f10 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterViewController.m +++ b/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterViewController.m @@ -301,7 +301,7 @@ __block NSMutableArray *names = [NSMutableArray array]; NSInteger defaultSelectIndex = 0; for (int index = 0; index < model.vipInfos.count; index++) { - NobleInfo *tagInfo = [model.vipInfos safeObjectAtIndex1:index]; + NobleInfo *tagInfo = [model.vipInfos xpSafeObjectAtIndex:index]; [names addObject:tagInfo.vipName]; if (model.currLevel > 0){ if (tagInfo.vipLevel == model.currLevel) { @@ -309,7 +309,7 @@ self.vipInfo = tagInfo; } }else{ - self.vipInfo = [model.vipInfos safeObjectAtIndex1:0]; + self.vipInfo = [model.vipInfos xpSafeObjectAtIndex:0]; } } @@ -574,7 +574,7 @@ - (id)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index { XPNobleCenterListViewController *VC = [[XPNobleCenterListViewController alloc] init]; VC.isOpenNoble = self.userInfo.userVipInfoVO.vipLevel; - NobleInfo *vipInfo = [self.model.vipInfos safeObjectAtIndex1:index]; + NobleInfo *vipInfo = [self.model.vipInfos xpSafeObjectAtIndex:index]; VC.vipInfo = vipInfo; if (vipInfo.comingSoon != 2) { VC.vipAuthInfos = [[NSMutableArray alloc]initWithArray:self.model.vipAuthInfos]; @@ -588,7 +588,7 @@ - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index { // 侧滑手势处理 self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0); - NobleInfo *vipInfo = [self.model.vipInfos safeObjectAtIndex1:index]; + NobleInfo *vipInfo = [self.model.vipInfos xpSafeObjectAtIndex:index]; self.vipInfo = vipInfo; [self setPayBtnStatus:vipInfo.vipLevel]; } diff --git a/YuMi/Modules/YMMine/View/Recharge/XPIAPRechargeViewController.m b/YuMi/Modules/YMMine/View/Recharge/XPIAPRechargeViewController.m index 0df52627..00bf00bc 100644 --- a/YuMi/Modules/YMMine/View/Recharge/XPIAPRechargeViewController.m +++ b/YuMi/Modules/YMMine/View/Recharge/XPIAPRechargeViewController.m @@ -171,7 +171,7 @@ } NSInteger index = self.selectedIndex.row; if(index < self.dataSource.count){ - RechargeListModel *model = [self.dataSource safeObjectAtIndex1:index]; + RechargeListModel *model = [self.dataSource xpSafeObjectAtIndex:index]; if (model.chargeProdId) { [XNDJTDDLoadingTool showOnlyView:kWindow]; [self.presenter requestIAPRechargeOrderWithChargeProdId:model.chargeProdId]; @@ -443,7 +443,7 @@ XPIAPRechargeCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(XPIAPRechargeCollectionViewCell.self) forIndexPath:indexPath]; NSInteger count = indexPath.item; - cell.rechargeModel = [self.dataSource safeObjectAtIndex1:count]; + cell.rechargeModel = [self.dataSource xpSafeObjectAtIndex:count]; cell.selectedStyle = self.selectedIndex.item == indexPath.item; return cell; } diff --git a/YuMi/Modules/YMMine/View/Setting/XPMineBlackListViewController.m b/YuMi/Modules/YMMine/View/Setting/XPMineBlackListViewController.m index 5f4e3b47..cea34679 100644 --- a/YuMi/Modules/YMMine/View/Setting/XPMineBlackListViewController.m +++ b/YuMi/Modules/YMMine/View/Setting/XPMineBlackListViewController.m @@ -37,7 +37,7 @@ if (array.count > 0) { NSMutableArray * uids = [NSMutableArray array]; for (int i = 0; i< array.count; i++) { - NIMUser * user = [array safeObjectAtIndex1:i]; + NIMUser * user = [array xpSafeObjectAtIndex:i]; [uids addObject:user.userId]; } [self.presenter getUserListInfo:uids]; @@ -69,7 +69,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { XPMineBlackListTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineBlackListTableViewCell class])]; - cell.userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } XPMineFriendEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])]; @@ -90,7 +90,7 @@ -(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{ if (editingStyle ==UITableViewCellEditingStyleDelete){ if (self.datasource.count > 0) { - UserInfoModel *userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + UserInfoModel *userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; [[NIMSDK sharedSDK].userManager removeFromBlackBlackList:[NSString stringWithFormat:@"%ld", userInfo.uid] completion:^(NSError * _Nullable error) { if (error == nil) { [self.datasource removeObject:userInfo]; diff --git a/YuMi/Modules/YMMine/View/Setting/XPMineNotificaViewController.m b/YuMi/Modules/YMMine/View/Setting/XPMineNotificaViewController.m index 86847cc4..b2893775 100644 --- a/YuMi/Modules/YMMine/View/Setting/XPMineNotificaViewController.m +++ b/YuMi/Modules/YMMine/View/Setting/XPMineNotificaViewController.m @@ -84,7 +84,7 @@ } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - XPMineNotificationItemModel *item = [self.dataModelArray safeObjectAtIndex1:indexPath.row]; + XPMineNotificationItemModel *item = [self.dataModelArray xpSafeObjectAtIndex:indexPath.row]; XPMineNotificationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineNotificationTableViewCell class]) forIndexPath:indexPath]; cell.delegate = self; cell.itemModel = item; diff --git a/YuMi/Modules/YMMine/View/Setting/XPMineSettingViewController.m b/YuMi/Modules/YMMine/View/Setting/XPMineSettingViewController.m index a457d4dc..4a8d30e9 100644 --- a/YuMi/Modules/YMMine/View/Setting/XPMineSettingViewController.m +++ b/YuMi/Modules/YMMine/View/Setting/XPMineSettingViewController.m @@ -281,8 +281,8 @@ if (cell == nil) { cell = [[XPMineSettingTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineSettingTableViewCell class])]; } - NSArray * array = [self.datasource safeObjectAtIndex1:indexPath.section]; - XPMineSettingItemModel * model = [array safeObjectAtIndex1:indexPath.row]; + NSArray * array = [self.datasource xpSafeObjectAtIndex:indexPath.section]; + XPMineSettingItemModel * model = [array xpSafeObjectAtIndex:indexPath.row]; cell.itemModel = model; return cell; } @@ -316,7 +316,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - XPMineSettingItemModel * model = [[self.datasource safeObjectAtIndex1:indexPath.section] safeObjectAtIndex1:indexPath.row]; + XPMineSettingItemModel * model = [[self.datasource xpSafeObjectAtIndex:indexPath.section] xpSafeObjectAtIndex:indexPath.row]; [self pushViewControllerWithType:model.type]; } } diff --git a/YuMi/Modules/YMMine/View/Setting/XPMineSwitchLanguageVC.m b/YuMi/Modules/YMMine/View/Setting/XPMineSwitchLanguageVC.m index cbae5991..d770ad44 100644 --- a/YuMi/Modules/YMMine/View/Setting/XPMineSwitchLanguageVC.m +++ b/YuMi/Modules/YMMine/View/Setting/XPMineSwitchLanguageVC.m @@ -82,7 +82,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { XPMineSwitchLanguageCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineSwitchLanguageCell class])]; - XPMineSettingItemModel * model = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMineSettingItemModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.model = model; return cell; } @@ -107,7 +107,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; - XPMineSettingItemModel * model = [self.datasource safeObjectAtIndex1:indexPath.row] ; + XPMineSettingItemModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row] ; for (XPMineSettingItemModel *obj in self.datasource) { obj.isChoose = NO; if ([model.title isEqualToString:obj.title]){ diff --git a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoGiftView.m b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoGiftView.m index 0a4189ca..22ab2983 100644 --- a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoGiftView.m +++ b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoGiftView.m @@ -74,7 +74,7 @@ if (indexPath.section == 0 && self.datasource.count > 0){ NSArray *dataList = self.datasource[indexPath.section]; if(indexPath.row < dataList.count){ - cell.giftInfo = [dataList safeObjectAtIndex1:indexPath.row]; + cell.giftInfo = [dataList xpSafeObjectAtIndex:indexPath.row]; [cell setLevel:((int)indexPath.row + 1)]; }else{ UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([UICollectionViewCell class]) forIndexPath:indexPath]; @@ -86,7 +86,7 @@ if (indexPath.section == 1 && self.datasource.count > 1){ NSArray *dataList = self.datasource[indexPath.section]; if(indexPath.row < dataList.count){ - cell.giftInfo = [dataList safeObjectAtIndex1:indexPath.row]; + cell.giftInfo = [dataList xpSafeObjectAtIndex:indexPath.row]; }else{ UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([UICollectionViewCell class]) forIndexPath:indexPath]; diff --git a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoVoiceCardView.m b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoVoiceCardView.m index 6fc85117..9cc2b27c 100644 --- a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoVoiceCardView.m +++ b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoVoiceCardView.m @@ -76,7 +76,7 @@ if (!self.isPlaying) { if(self.voiceInfo.propVals.count) { // NSString *fileName = [[self.voiceInfo.name componentsSeparatedByString:@"/"] lastObject]; - NSString * url = [self.voiceInfo.propVals safeObjectAtIndex1:0]; + NSString * url = [self.voiceInfo.propVals xpSafeObjectAtIndex:0]; NSArray * nameArray = [url componentsSeparatedByString:@"/"]; NSString * fileName = @"daeplay"; if (nameArray.count > 0) { diff --git a/YuMi/Modules/YMMine/View/XPMineFansTeamViewController.m b/YuMi/Modules/YMMine/View/XPMineFansTeamViewController.m index dd380e91..a2e81ffe 100644 --- a/YuMi/Modules/YMMine/View/XPMineFansTeamViewController.m +++ b/YuMi/Modules/YMMine/View/XPMineFansTeamViewController.m @@ -82,7 +82,7 @@ if (cell == nil) { cell = [[XPMineAnchorFansTeamTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineAnchorFansTeamTableViewCell class])]; } - cell.item = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.item = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } @@ -95,7 +95,7 @@ } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - XPMineAnchorFansTeamModel *item = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMineAnchorFansTeamModel *item = [self.datasource xpSafeObjectAtIndex:indexPath.row]; XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; userInfoVC.uid = item.teamUid; [self.navigationController pushViewController:userInfoVC animated:YES]; diff --git a/YuMi/Modules/YMMine/View/XPMineFootPrintViewController.m b/YuMi/Modules/YMMine/View/XPMineFootPrintViewController.m index 3bf37dad..6369250d 100644 --- a/YuMi/Modules/YMMine/View/XPMineFootPrintViewController.m +++ b/YuMi/Modules/YMMine/View/XPMineFootPrintViewController.m @@ -151,7 +151,7 @@ if (cell == nil) { cell = [[XPMineFootPrintTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineFootPrintTableViewCell class])]; } - cell.item = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.item = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } @@ -167,12 +167,12 @@ [tableView setEditing:NO animated:YES]; __weak typeof(self) weakSelf = self; UIContextualAction *deleteAction = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive title:YMLocalizedString(@"XPMineFootPrintViewController4") handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) { - XPMineFootPrintModel *item = [weakSelf.datasource safeObjectAtIndex1:indexPath.row]; + XPMineFootPrintModel *item = [weakSelf.datasource xpSafeObjectAtIndex:indexPath.row]; [weakSelf.presenter cleanFootPrint:item.roomUid]; completionHandler(true); }]; UIContextualAction *collectAction = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleNormal title:YMLocalizedString(@"XPMineFootPrintViewController5") handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) { - XPMineFootPrintModel *item = [weakSelf.datasource safeObjectAtIndex1:indexPath.row]; + XPMineFootPrintModel *item = [weakSelf.datasource xpSafeObjectAtIndex:indexPath.row]; [weakSelf.presenter collectRoomWithRoomUid:item.roomUid]; completionHandler(true); }]; @@ -193,7 +193,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { - XPMineFootPrintModel *model = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMineFootPrintModel *model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (model.roomUid.integerValue > 0) { [XPRoomViewController openRoom:model.roomUid viewController:self]; } diff --git a/YuMi/Modules/YMMine/View/XPMineUserInfoRecordedSoundVC.m b/YuMi/Modules/YMMine/View/XPMineUserInfoRecordedSoundVC.m index df0a82b2..c374da66 100644 --- a/YuMi/Modules/YMMine/View/XPMineUserInfoRecordedSoundVC.m +++ b/YuMi/Modules/YMMine/View/XPMineUserInfoRecordedSoundVC.m @@ -269,7 +269,7 @@ UIKIT_EXTERN NSString * kUpdateSoundInfo; } NSString *fileName = [[self.filePath componentsSeparatedByString:@"/"] lastObject]; - NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"kMineSoundCard"]; + NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"kMineSoundCard"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]) { [self playAudioWithUrl:fullPath time:(int)getCurrentTime isDelay:[XPSkillCardPlayerManager shareInstance].isMineInMic]; diff --git a/YuMi/Modules/YMMine/View/XPMineViewController.m b/YuMi/Modules/YMMine/View/XPMineViewController.m index 0501c959..63f509b7 100644 --- a/YuMi/Modules/YMMine/View/XPMineViewController.m +++ b/YuMi/Modules/YMMine/View/XPMineViewController.m @@ -642,7 +642,7 @@ UIKIT_EXTERN NSString *kRequestRicket; NobleCenterModel *model = [NobleCenterModel modelWithDictionary:data.data]; NobleInfo *vipInfo ; for (int index = 0; index < model.vipInfos.count; index++) { - NobleInfo *tagInfo = [model.vipInfos safeObjectAtIndex1:index]; + NobleInfo *tagInfo = [model.vipInfos xpSafeObjectAtIndex:index]; if (model.currLevel > 0){ if (tagInfo.vipLevel == model.currLevel) { diff --git a/YuMi/Modules/YMMine/View/XPMineVisitorViewController.m b/YuMi/Modules/YMMine/View/XPMineVisitorViewController.m index 79e18caf..90d086b1 100644 --- a/YuMi/Modules/YMMine/View/XPMineVisitorViewController.m +++ b/YuMi/Modules/YMMine/View/XPMineVisitorViewController.m @@ -133,7 +133,7 @@ cell.isFirstItem = indexPath.row == 0; cell.isLastItem = indexPath.row == self.datasource.count - 1; cell.delegate = self; - cell.item = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.item = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } @@ -156,7 +156,7 @@ #pragma mark - TTVisitorRecordCellDelegate - (void)onAvatarClick:(XPMineVisitorTableViewCell *)cell { NSIndexPath *indexPath = [self.tableView indexPathForCell:cell]; - XPMineVisitorItemModel *item = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMineVisitorItemModel *item = [self.datasource xpSafeObjectAtIndex:indexPath.row]; XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; userInfoVC.uid = item.uid; [self.navigationController pushViewController:userInfoVC animated:YES]; @@ -164,7 +164,7 @@ - (void)onChatClick:(XPMineVisitorTableViewCell *)cell { NSIndexPath *indexPath = [self.tableView indexPathForCell:cell]; - XPMineVisitorItemModel *item = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMineVisitorItemModel *item = [self.datasource xpSafeObjectAtIndex:indexPath.row]; NSString * sessionId = [NSString stringWithFormat:@"%lld",item.uid]; NIMSession * session = [NIMSession session:sessionId type:NIMSessionTypeP2P]; SessionViewController * sessionVC = [[SessionViewController alloc] initWithSession:session]; diff --git a/YuMi/Modules/YMMine/View/XPPermissionsViewController.m b/YuMi/Modules/YMMine/View/XPPermissionsViewController.m index 82e0ddc3..b639cccb 100644 --- a/YuMi/Modules/YMMine/View/XPPermissionsViewController.m +++ b/YuMi/Modules/YMMine/View/XPPermissionsViewController.m @@ -195,9 +195,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger section = indexPath.section; XPPermissionCell * cell = [[XPPermissionCell alloc] init]; - cell.icon.image = [UIImage imageNamed:[self.permissionIcons safeObjectAtIndex1:section]]; - cell.name.text = [self.permissionNames safeObjectAtIndex1:section]; - cell.tip.text = [self.permissionTips safeObjectAtIndex1:section]; + cell.icon.image = [UIImage imageNamed:[self.permissionIcons xpSafeObjectAtIndex:section]]; + cell.name.text = [self.permissionNames xpSafeObjectAtIndex:section]; + cell.tip.text = [self.permissionTips xpSafeObjectAtIndex:section]; return cell; } diff --git a/YuMi/Modules/YMMine/View/XPPrivacyViewController.m b/YuMi/Modules/YMMine/View/XPPrivacyViewController.m index bc6754f3..6bbc0d04 100644 --- a/YuMi/Modules/YMMine/View/XPPrivacyViewController.m +++ b/YuMi/Modules/YMMine/View/XPPrivacyViewController.m @@ -55,7 +55,7 @@ cell = [[XPMineSettingTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineSettingTableViewCell class])]; } - cell.itemModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.itemModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } diff --git a/YuMi/Modules/YMMonents/View/Cell/XPMomentListCollectionViewCell.m b/YuMi/Modules/YMMonents/View/Cell/XPMomentListCollectionViewCell.m index 9f240777..61ccf850 100644 --- a/YuMi/Modules/YMMonents/View/Cell/XPMomentListCollectionViewCell.m +++ b/YuMi/Modules/YMMonents/View/Cell/XPMomentListCollectionViewCell.m @@ -87,7 +87,7 @@ _monentsInfo = monentsInfo; if (_monentsInfo) { if (_monentsInfo.dynamicResList.count > 0) { - MonentsPicInfoModel * picInfo = [_monentsInfo.dynamicResList safeObjectAtIndex1:0]; + MonentsPicInfoModel * picInfo = [_monentsInfo.dynamicResList xpSafeObjectAtIndex:0]; self.coverImageView.imageUrl = picInfo.resUrl; }else{ self.coverImageView.imageUrl = _monentsInfo.avatar; diff --git a/YuMi/Modules/YMMonents/View/Cell/XPMonentsCommentTableViewCell.m b/YuMi/Modules/YMMonents/View/Cell/XPMonentsCommentTableViewCell.m index c4c2bb17..5e5471d9 100644 --- a/YuMi/Modules/YMMonents/View/Cell/XPMonentsCommentTableViewCell.m +++ b/YuMi/Modules/YMMonents/View/Cell/XPMonentsCommentTableViewCell.m @@ -184,7 +184,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section == 0) { - MonentsReplyModel * replayinfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsReplyModel * replayinfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return replayinfo.replyRowHeight; } return 44; @@ -193,7 +193,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section == 0) { XPMonentsReplyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsReplyTableViewCell class])]; - cell.replyInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.replyInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } @@ -206,7 +206,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (indexPath.section == 0 && self.datasource.count > 0) { - MonentsReplyModel * replyInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsReplyModel * replyInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (replyInfo.uid.integerValue != [AccountInfoStorage instance].getUid.integerValue && self.delegate && [self.delegate respondsToSelector:@selector(xPMonentsCommentTableViewCell:didClickCommon:)]) { [self.delegate xPMonentsCommentTableViewCell:self didClickCommon:replyInfo]; } diff --git a/YuMi/Modules/YMMonents/View/Cell/XPMonentsTableViewCell.m b/YuMi/Modules/YMMonents/View/Cell/XPMonentsTableViewCell.m index d6c7ee30..17e429aa 100644 --- a/YuMi/Modules/YMMonents/View/Cell/XPMonentsTableViewCell.m +++ b/YuMi/Modules/YMMonents/View/Cell/XPMonentsTableViewCell.m @@ -212,7 +212,7 @@ NSArray *list = self.monentsInfo != nil ? self.monentsInfo.dynamicResList : self.mineMonentsInfo.dynamicResList; if(index < list.count){ - MonentsPicInfoModel *picinfo = [list safeObjectAtIndex1:index]; + MonentsPicInfoModel *picinfo = [list xpSafeObjectAtIndex:index]; return [NSURL URLWithString:picinfo.resUrl]; } return [NSURL URLWithString:@""];; diff --git a/YuMi/Modules/YMMonents/View/SubViews/XPMoentsTopicListView.m b/YuMi/Modules/YMMonents/View/SubViews/XPMoentsTopicListView.m index 5daf4a4a..d8c9e9fb 100644 --- a/YuMi/Modules/YMMonents/View/SubViews/XPMoentsTopicListView.m +++ b/YuMi/Modules/YMMonents/View/SubViews/XPMoentsTopicListView.m @@ -217,7 +217,7 @@ if (cell == nil) { cell = [[XPMoentsTopicListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMoentsTopicListTableViewCell class])]; } - cell.topicInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.topicInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } @@ -228,7 +228,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - MonentsTopicModel * infor = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsTopicModel * infor = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPMoentsTopicListView:didSelectItem:)]) { [self.delegate xPMoentsTopicListView:self didSelectItem:infor]; } diff --git a/YuMi/Modules/YMMonents/View/SubViews/XPMonentsPhotoView.m b/YuMi/Modules/YMMonents/View/SubViews/XPMonentsPhotoView.m index a4bd1716..92393818 100644 --- a/YuMi/Modules/YMMonents/View/SubViews/XPMonentsPhotoView.m +++ b/YuMi/Modules/YMMonents/View/SubViews/XPMonentsPhotoView.m @@ -87,7 +87,7 @@ make.size.mas_equalTo(CGSizeMake(KScreenWidth-27*2, KScreenWidth-27*2)); make.leading.top.mas_equalTo(self); }]; - MonentsPicInfoModel * picInfo = [ _mineDynamicResList safeObjectAtIndex1:0]; + MonentsPicInfoModel * picInfo = [ _mineDynamicResList xpSafeObjectAtIndex:0]; if(picInfo != nil){ self.firstImageView.imageUrl = picInfo.resUrl; } @@ -99,7 +99,7 @@ make.leading.top.mas_equalTo(self); }]; - MonentsPicInfoModel * picInfo = [ _mineDynamicResList safeObjectAtIndex1:0]; + MonentsPicInfoModel * picInfo = [ _mineDynamicResList xpSafeObjectAtIndex:0]; if(picInfo != nil){ self.firstImageView.imageUrl = picInfo.resUrl; @@ -110,7 +110,7 @@ make.leading.mas_equalTo(self.firstImageView.mas_trailing).offset(kMONENTS_PIC_SPACE); }]; } - MonentsPicInfoModel * secondPicInfo = [ _mineDynamicResList safeObjectAtIndex1:1]; + MonentsPicInfoModel * secondPicInfo = [ _mineDynamicResList xpSafeObjectAtIndex:1]; if(secondPicInfo != nil){ self.secondImageView.imageUrl = secondPicInfo.resUrl; @@ -118,9 +118,9 @@ } else{ for (int i = 0; i < _mineDynamicResList.count; i++) { - MonentsPicInfoModel * picInfo = [ _mineDynamicResList safeObjectAtIndex1:i]; + MonentsPicInfoModel * picInfo = [ _mineDynamicResList xpSafeObjectAtIndex:i]; if (i < self.subViewArray.count) { - NetImageView * imageView = [self.subViewArray safeObjectAtIndex1:i]; + NetImageView * imageView = [self.subViewArray xpSafeObjectAtIndex:i]; imageView.hidden = NO; imageView.imageUrl = picInfo.resUrl; } @@ -130,7 +130,7 @@ for (int i = 0; i < self.subViewArray.count; i++) { NSInteger page = i % 3; NSInteger line = i / 3; - NetImageView * imageView = [self.subViewArray safeObjectAtIndex1:i]; + NetImageView * imageView = [self.subViewArray xpSafeObjectAtIndex:i]; if(imageView == nil)return; [imageView mas_remakeConstraints:^(MASConstraintMaker *make) { make.size.mas_equalTo(CGSizeMake(itemWidth, itemWidth)); @@ -155,7 +155,7 @@ make.size.mas_equalTo(CGSizeMake(kMONENTS_PIC_ONE_WIDTH, kMONENTS_PIC_ONE_WIDTH)); make.leading.top.mas_equalTo(self); }]; - MonentsPicInfoModel * picInfo = [_dynamicResList safeObjectAtIndex1:0]; + MonentsPicInfoModel * picInfo = [_dynamicResList xpSafeObjectAtIndex:0]; self.firstImageView.imageUrl = picInfo.resUrl; } else if(_dynamicResList.count == 2) { self.firstImageView.hidden = NO; @@ -165,7 +165,7 @@ make.leading.top.mas_equalTo(self); }]; - MonentsPicInfoModel * picInfo = [_dynamicResList safeObjectAtIndex1:0]; + MonentsPicInfoModel * picInfo = [_dynamicResList xpSafeObjectAtIndex:0]; self.firstImageView.imageUrl = picInfo.resUrl; self.secondImageView.hidden = NO; @@ -175,14 +175,14 @@ make.leading.mas_equalTo(self.firstImageView.mas_trailing).offset(kMONENTS_PIC_SPACE); }]; - MonentsPicInfoModel * secondPicInfo = [_dynamicResList safeObjectAtIndex1:1]; + MonentsPicInfoModel * secondPicInfo = [_dynamicResList xpSafeObjectAtIndex:1]; self.secondImageView.imageUrl = secondPicInfo.resUrl; } else{ for (int i = 0; i < _dynamicResList.count; i++) { - MonentsPicInfoModel * picInfo = [_dynamicResList safeObjectAtIndex1:i]; + MonentsPicInfoModel * picInfo = [_dynamicResList xpSafeObjectAtIndex:i]; if (i < self.subViewArray.count) { - NetImageView * imageView = [self.subViewArray safeObjectAtIndex1:i]; + NetImageView * imageView = [self.subViewArray xpSafeObjectAtIndex:i]; imageView.hidden = NO; imageView.imageUrl = picInfo.resUrl; } @@ -192,7 +192,7 @@ for (int i = 0; i < self.subViewArray.count; i++) { NSInteger page = i % 3; NSInteger line = i / 3; - NetImageView * imageView = [self.subViewArray safeObjectAtIndex1:i]; + NetImageView * imageView = [self.subViewArray xpSafeObjectAtIndex:i]; if(imageView == nil)return; [imageView mas_remakeConstraints:^(MASConstraintMaker *make) { make.size.mas_equalTo(CGSizeMake(itemWidth, itemWidth)); diff --git a/YuMi/Modules/YMMonents/View/SubViews/XPMonentsRecommendHeaderView.m b/YuMi/Modules/YMMonents/View/SubViews/XPMonentsRecommendHeaderView.m index 4a3c0c1e..1ce6d9ff 100644 --- a/YuMi/Modules/YMMonents/View/SubViews/XPMonentsRecommendHeaderView.m +++ b/YuMi/Modules/YMMonents/View/SubViews/XPMonentsRecommendHeaderView.m @@ -105,7 +105,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPMonentsTopicCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMonentsTopicCollectionViewCell class]) forIndexPath:indexPath]; - cell.topicInfo = [self.topicList safeObjectAtIndex1:indexPath.row]; + cell.topicInfo = [self.topicList xpSafeObjectAtIndex:indexPath.row]; return cell; } @@ -113,7 +113,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; if (self.topicList.count > 0) { - MonentsTopicModel * topicInfo = [self.topicList safeObjectAtIndex1:indexPath.row]; + MonentsTopicModel * topicInfo = [self.topicList xpSafeObjectAtIndex:indexPath.row]; if(topicInfo == nil)return; if (self.delegate && [self.delegate respondsToSelector:@selector(xPMonentsRecommendHeaderView:didSelectItem:)]) { [self.delegate xPMonentsRecommendHeaderView:self didSelectItem:topicInfo]; diff --git a/YuMi/Modules/YMMonents/View/SubViews/XPMonentsUserInfoView.m b/YuMi/Modules/YMMonents/View/SubViews/XPMonentsUserInfoView.m index c715a1f3..1a45c636 100644 --- a/YuMi/Modules/YMMonents/View/SubViews/XPMonentsUserInfoView.m +++ b/YuMi/Modules/YMMonents/View/SubViews/XPMonentsUserInfoView.m @@ -289,9 +289,9 @@ self.secondTagImageView.hidden = YES; self.thirdTagImageView.hidden = YES; for (int i = 0; i< _monentsInfo.labelList.count; i++) { - NSString * imageUrl = [_monentsInfo.labelList safeObjectAtIndex1:i]; + NSString * imageUrl = [_monentsInfo.labelList xpSafeObjectAtIndex:i]; if (i < self.tagStackView.subviews.count) { - NetImageView * image = [self.tagStackView.subviews safeObjectAtIndex1:i]; + NetImageView * image = [self.tagStackView.subviews xpSafeObjectAtIndex:i]; if(image != nil){ image.hidden = NO; image.imageUrl = imageUrl; diff --git a/YuMi/Modules/YMMonents/View/XPMoentsTopicListViewController.m b/YuMi/Modules/YMMonents/View/XPMoentsTopicListViewController.m index 116007c1..149d1cf3 100644 --- a/YuMi/Modules/YMMonents/View/XPMoentsTopicListViewController.m +++ b/YuMi/Modules/YMMonents/View/XPMoentsTopicListViewController.m @@ -93,7 +93,7 @@ if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([UITableViewCell class])]; } - MonentsTopicModel * topicModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsTopicModel * topicModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.textLabel.text = [NSString stringWithFormat:@"#%@", topicModel.name]; cell.textLabel.textColor = [DJDKMIMOMColor mainTextColor]; cell.textLabel.font = [UIFont systemFontOfSize:13]; @@ -103,7 +103,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - MonentsTopicModel * topicModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsTopicModel * topicModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; XPMonentTopicContainerViewController * topicVC = [[XPMonentTopicContainerViewController alloc] init]; topicVC.worldId = topicModel.tId; [self.navigationController pushViewController:topicVC animated:YES]; diff --git a/YuMi/Modules/YMMonents/View/XPMomentsSimpleDetailViewController.m b/YuMi/Modules/YMMonents/View/XPMomentsSimpleDetailViewController.m index 91c2b077..fb32cc67 100644 --- a/YuMi/Modules/YMMonents/View/XPMomentsSimpleDetailViewController.m +++ b/YuMi/Modules/YMMonents/View/XPMomentsSimpleDetailViewController.m @@ -198,7 +198,7 @@ return self.monentsInfo.rowHeight+20; } else if(indexPath.section == 1) { if (self.datasource.count > 0) { - MonentsCommentModel * commentInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsCommentModel * commentInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return [XPMonentsLayoutConfig commentCommentRowHeight:commentInfo]; } else { return 400; @@ -241,7 +241,7 @@ } else { if (self.datasource.count > 0) { XPMonentsCommentTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsCommentTableViewCell class])]; - cell.commentInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.commentInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } else { @@ -255,7 +255,7 @@ [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (indexPath.section == 1) { if (self.datasource.count > 0) { - MonentsCommentModel* monent = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsCommentModel* monent = [self.datasource xpSafeObjectAtIndex:indexPath.row]; self.commentId = monent.commentId; self.inputBarView.inputTextView.placeholder = [NSString stringWithFormat:@"%@: %@",YMLocalizedString(@"XPMonentsDetailViewController3"), monent.nick]; [self.inputBarView textViewBecomeFirstResponder]; diff --git a/YuMi/Modules/YMMonents/View/XPMonentsAttentionViewController.m b/YuMi/Modules/YMMonents/View/XPMonentsAttentionViewController.m index 91143957..1f1bbea8 100644 --- a/YuMi/Modules/YMMonents/View/XPMonentsAttentionViewController.m +++ b/YuMi/Modules/YMMonents/View/XPMonentsAttentionViewController.m @@ -113,7 +113,7 @@ UIKIT_EXTERN NSString *kRequestRicket; - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { - MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentInfo= [self.datasource xpSafeObjectAtIndex:indexPath.row]; [XPMonentsLayoutConfig layoutMonentsModel:monentInfo]; if(monentInfo.squareTop && monentInfo.content.length == 0){ return monentInfo.rowHeight + 20 ; @@ -128,7 +128,7 @@ UIKIT_EXTERN NSString *kRequestRicket; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsTableViewCell class])]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; cell.monentsInfo = monentsInfo; return cell; @@ -141,7 +141,7 @@ UIKIT_EXTERN NSString *kRequestRicket; [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; detailVC.monentsInfo = monentsInfo; detailVC.delegate = self; [self.navigationController pushViewController:detailVC animated:YES]; diff --git a/YuMi/Modules/YMMonents/View/XPMonentsDetailViewController.m b/YuMi/Modules/YMMonents/View/XPMonentsDetailViewController.m index fd9c3da3..ae3dd981 100644 --- a/YuMi/Modules/YMMonents/View/XPMonentsDetailViewController.m +++ b/YuMi/Modules/YMMonents/View/XPMonentsDetailViewController.m @@ -219,7 +219,7 @@ } } else if(indexPath.section == 1) { if (self.datasource.count > 0) { - MonentsCommentModel * commentInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsCommentModel * commentInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return [XPMonentsLayoutConfig commentCommentRowHeight:commentInfo]; } else { return 400; @@ -257,7 +257,7 @@ } else { if (self.datasource.count > 0) { XPMonentsCommentTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsCommentTableViewCell class])]; - cell.commentInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.commentInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } else { @@ -271,7 +271,7 @@ [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (indexPath.section == 1) { if (self.datasource.count > 0) { - MonentsCommentModel* monent = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsCommentModel* monent = [self.datasource xpSafeObjectAtIndex:indexPath.row]; self.commentId = monent.commentId; self.inputBarView.inputTextView.placeholder = [NSString stringWithFormat:YMLocalizedString(@"XPMonentsDetailViewController3"), monent.nick]; [self.inputBarView textViewBecomeFirstResponder]; diff --git a/YuMi/Modules/YMMonents/View/XPMonentsInteractiveViewController.m b/YuMi/Modules/YMMonents/View/XPMonentsInteractiveViewController.m index be72030d..b55a1a29 100644 --- a/YuMi/Modules/YMMonents/View/XPMonentsInteractiveViewController.m +++ b/YuMi/Modules/YMMonents/View/XPMonentsInteractiveViewController.m @@ -108,7 +108,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { - MonentsInteractiveModel * model = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInteractiveModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return model.worldName.length > 0? 130 : 90; } return KScreenHeight - kNavigationHeight; @@ -117,7 +117,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { XPMonentsInteractiveTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsInteractiveTableViewCell class])]; - MonentsInteractiveModel * model = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInteractiveModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.interactiveInfo = model; return cell; } @@ -128,7 +128,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - MonentsInteractiveModel * model = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInteractiveModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row]; MonentsInfoModel * monents = [[MonentsInfoModel alloc] init]; monents.dynamicId = model.dynamicId; diff --git a/YuMi/Modules/YMMonents/View/XPMonentsLatestViewController.m b/YuMi/Modules/YMMonents/View/XPMonentsLatestViewController.m index 1a8f54c8..f1c4452f 100644 --- a/YuMi/Modules/YMMonents/View/XPMonentsLatestViewController.m +++ b/YuMi/Modules/YMMonents/View/XPMonentsLatestViewController.m @@ -112,7 +112,7 @@ UIKIT_EXTERN NSString *kRequestRicket; - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { - MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentInfo= [self.datasource xpSafeObjectAtIndex:indexPath.row]; [XPMonentsLayoutConfig layoutMonentsModel:monentInfo]; if(monentInfo.squareTop && monentInfo.content.length == 0){ return monentInfo.rowHeight + 20 ; @@ -127,7 +127,7 @@ UIKIT_EXTERN NSString *kRequestRicket; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsTableViewCell class])]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.monentsInfo = monentsInfo; cell.delegate = self; return cell; @@ -140,7 +140,7 @@ UIKIT_EXTERN NSString *kRequestRicket; [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; detailVC.monentsInfo = monentsInfo; detailVC.delegate = self; [self.navigationController pushViewController:detailVC animated:YES]; diff --git a/YuMi/Modules/YMMonents/View/XPMonentsMineViewController.m b/YuMi/Modules/YMMonents/View/XPMonentsMineViewController.m index 30921159..6ce94a33 100644 --- a/YuMi/Modules/YMMonents/View/XPMonentsMineViewController.m +++ b/YuMi/Modules/YMMonents/View/XPMonentsMineViewController.m @@ -72,7 +72,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { - MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentInfo= [self.datasource xpSafeObjectAtIndex:indexPath.row]; [XPMonentsLayoutConfig layoutMonentsModel:monentInfo]; return monentInfo.rowHeight; } @@ -82,7 +82,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsTableViewCell class])]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; cell.monentsInfo = monentsInfo; return cell; @@ -94,7 +94,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if(monentsInfo.dynamicId == nil) { return; } diff --git a/YuMi/Modules/YMMonents/View/XPMonentsPublishViewController.m b/YuMi/Modules/YMMonents/View/XPMonentsPublishViewController.m index 778eca4c..0992d8e7 100644 --- a/YuMi/Modules/YMMonents/View/XPMonentsPublishViewController.m +++ b/YuMi/Modules/YMMonents/View/XPMonentsPublishViewController.m @@ -238,7 +238,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPMonentsPublishCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMonentsPublishCollectionViewCell class]) forIndexPath:indexPath]; - UIImage * image = [self.datasource safeObjectAtIndex1:indexPath.row]; + UIImage * image = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (indexPath.row == (self.datasource.count -1)) { cell.isShowDelete = self.datasource.count == 9; } else { diff --git a/YuMi/Modules/YMMonents/View/XPMonentsRecommendViewController.m b/YuMi/Modules/YMMonents/View/XPMonentsRecommendViewController.m index cfeee072..5048cd32 100644 --- a/YuMi/Modules/YMMonents/View/XPMonentsRecommendViewController.m +++ b/YuMi/Modules/YMMonents/View/XPMonentsRecommendViewController.m @@ -122,7 +122,7 @@ UIKIT_EXTERN NSString *kRequestRicket; - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { - MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentInfo= [self.datasource xpSafeObjectAtIndex:indexPath.row]; [XPMonentsLayoutConfig layoutMonentsModel:monentInfo]; if(monentInfo.squareTop && monentInfo.content.length == 0){ @@ -138,7 +138,7 @@ UIKIT_EXTERN NSString *kRequestRicket; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsTableViewCell class])]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.monentsInfo = monentsInfo; cell.delegate = self; return cell; @@ -151,7 +151,7 @@ UIKIT_EXTERN NSString *kRequestRicket; [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; detailVC.monentsInfo = monentsInfo; detailVC.delegate = self; [self.navigationController pushViewController:detailVC animated:YES]; diff --git a/YuMi/Modules/YMMonents/View/XPMonentsTopicLatestViewController.m b/YuMi/Modules/YMMonents/View/XPMonentsTopicLatestViewController.m index af87c4f1..4069b9d6 100644 --- a/YuMi/Modules/YMMonents/View/XPMonentsTopicLatestViewController.m +++ b/YuMi/Modules/YMMonents/View/XPMonentsTopicLatestViewController.m @@ -181,7 +181,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { - MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentInfo= [self.datasource xpSafeObjectAtIndex:indexPath.row]; [XPMonentsLayoutConfig layoutMonentsModel:monentInfo]; if(monentInfo.squareTop && monentInfo.content.length == 0){ return monentInfo.rowHeight + 20 ; @@ -195,7 +195,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsTableViewCell class])]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; cell.monentsInfo = monentsInfo; return cell; @@ -208,7 +208,7 @@ [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; detailVC.monentsInfo = monentsInfo; [self.navigationController pushViewController:detailVC animated:YES]; } diff --git a/YuMi/Modules/YMMonents/View/XPMonentsTopicRecommondViewController.m b/YuMi/Modules/YMMonents/View/XPMonentsTopicRecommondViewController.m index e7188b5b..4e1395e5 100644 --- a/YuMi/Modules/YMMonents/View/XPMonentsTopicRecommondViewController.m +++ b/YuMi/Modules/YMMonents/View/XPMonentsTopicRecommondViewController.m @@ -100,7 +100,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { - MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentInfo= [self.datasource xpSafeObjectAtIndex:indexPath.row]; [XPMonentsLayoutConfig layoutMonentsModel:monentInfo]; if(monentInfo.squareTop && monentInfo.content.length == 0){ return monentInfo.rowHeight + 20 ; @@ -114,7 +114,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsTableViewCell class])]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; cell.isTopic = YES; cell.monentsInfo = monentsInfo; @@ -128,7 +128,7 @@ [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init]; - MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + MonentsInfoModel * monentsInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; detailVC.monentsInfo = monentsInfo; detailVC.delegate = self; [self.navigationController pushViewController:detailVC animated:YES]; diff --git a/YuMi/Modules/YMNewHome/View/Cell/XPHomeBannerTableViewCell.m b/YuMi/Modules/YMNewHome/View/Cell/XPHomeBannerTableViewCell.m index cb2339af..916e1dad 100644 --- a/YuMi/Modules/YMNewHome/View/Cell/XPHomeBannerTableViewCell.m +++ b/YuMi/Modules/YMNewHome/View/Cell/XPHomeBannerTableViewCell.m @@ -44,7 +44,7 @@ } #pragma mark - SDCycleScrollViewDelegate - (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { - HomeBannerInfoModel * bannerInfo = [self.bannerList safeObjectAtIndex1:index]; + HomeBannerInfoModel * bannerInfo = [self.bannerList xpSafeObjectAtIndex:index]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeBannerTableViewCell:didClickBanner:)]) { [self.delegate xPHomeBannerTableViewCell:self didClickBanner:bannerInfo]; } diff --git a/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePartyTagView.m b/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePartyTagView.m index c9ca699d..5c2150f4 100644 --- a/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePartyTagView.m +++ b/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePartyTagView.m @@ -29,7 +29,7 @@ }]; } - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { - NSNumber *width = [self.itemWidthist safeObjectAtIndex1:indexPath.row]; + NSNumber *width = [self.itemWidthist xpSafeObjectAtIndex:indexPath.row]; if(width != nil)return CGSizeMake([width floatValue], kGetScaleWidth(18));; return CGSizeMake(kGetScaleWidth(46), kGetScaleWidth(18)); } @@ -43,7 +43,7 @@ XPNewHomePartyTagItemView *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPNewHomePartyTagItemView class]) forIndexPath:indexPath]; cell.path = indexPath; - cell.title = [self.itemList safeObjectAtIndex1:indexPath.row]; + cell.title = [self.itemList xpSafeObjectAtIndex:indexPath.row]; return cell; } -(void)setItemList:(NSMutableArray *)itemList{ diff --git a/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePlayTableViewCell.m b/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePlayTableViewCell.m index 94ce9838..c9047e24 100644 --- a/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePlayTableViewCell.m +++ b/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePlayTableViewCell.m @@ -64,14 +64,14 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPNewHomePlayItemCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPNewHomePlayItemCollectionViewCell class]) forIndexPath:indexPath]; - cell.roomInfo = [self.playRoomList safeObjectAtIndex1:indexPath.row]; + cell.roomInfo = [self.playRoomList xpSafeObjectAtIndex:indexPath.row]; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; if (self.playRoomList.count > 0) { - HomePlayRoomModel * roomInfo = [self.playRoomList safeObjectAtIndex1:indexPath.row]; + HomePlayRoomModel * roomInfo = [self.playRoomList xpSafeObjectAtIndex:indexPath.row]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPNewHomePlayTableViewCell:didSelectItem:)]) { [self.delegate xPNewHomePlayTableViewCell:self didSelectItem:roomInfo]; } diff --git a/YuMi/Modules/YMNewHome/View/Cell/XPNewHomeRecommendTableViewCell.m b/YuMi/Modules/YMNewHome/View/Cell/XPNewHomeRecommendTableViewCell.m index 7d21215f..9dcdfca6 100644 --- a/YuMi/Modules/YMNewHome/View/Cell/XPNewHomeRecommendTableViewCell.m +++ b/YuMi/Modules/YMNewHome/View/Cell/XPNewHomeRecommendTableViewCell.m @@ -215,14 +215,14 @@ cell = [[XPCycleScrollViewCell alloc] init]; } - HomeRecommendRoomModel * info = [self.recommends safeObjectAtIndex1:index]; + HomeRecommendRoomModel * info = [self.recommends xpSafeObjectAtIndex:index]; cell.recommendRoomInfo = info; cell.isCenterView = index == self.pi_scrollView.currentSelectIndex; return cell; } - (void)cycleScrollView:(GKCycleScrollView *)cycleScrollView didScrollCellToIndex:(NSInteger)index{ - HomeRecommendRoomModel * info = [self.recommends safeObjectAtIndex1:index]; + HomeRecommendRoomModel * info = [self.recommends xpSafeObjectAtIndex:index]; NSLog(@"%@",info.title); UIView *view = cycleScrollView.subviews[0]; @@ -233,7 +233,7 @@ } - (void)cycleScrollView:(GKCycleScrollView *)cycleScrollView didSelectCellAtIndex:(NSInteger)index { if(self.recommends.count > 0 && index < self.recommends.count) { - HomeRecommendRoomModel * info = [self.recommends safeObjectAtIndex1:index]; + HomeRecommendRoomModel * info = [self.recommends xpSafeObjectAtIndex:index]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPNewHomeRecommendTableViewCell:didSelectItem:)]) { [self.delegate xPNewHomeRecommendTableViewCell:self didSelectItem:info]; } diff --git a/YuMi/Modules/YMNewHome/View/CustomView/XPNewHomeHeadView.m b/YuMi/Modules/YMNewHome/View/CustomView/XPNewHomeHeadView.m index 013a4b7d..8cd5abb5 100644 --- a/YuMi/Modules/YMNewHome/View/CustomView/XPNewHomeHeadView.m +++ b/YuMi/Modules/YMNewHome/View/CustomView/XPNewHomeHeadView.m @@ -48,7 +48,7 @@ } #pragma mark - SDCycleScrollViewDelegate - (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { - HomeBannerInfoModel * bannerInfo = [self.bannerList safeObjectAtIndex1:index]; + HomeBannerInfoModel * bannerInfo = [self.bannerList xpSafeObjectAtIndex:index]; if(bannerInfo != nil && self.delegate && [self.delegate respondsToSelector:@selector(selectBannerListWithModel:)]){ [self.delegate selectBannerListWithModel:bannerInfo]; } @@ -120,7 +120,7 @@ return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ - PIHomeItemModel *model = [self.itemList safeObjectAtIndex1:indexPath.row]; + PIHomeItemModel *model = [self.itemList xpSafeObjectAtIndex:indexPath.row]; if(model != nil && self.delegate && [self.delegate respondsToSelector:@selector(selectItemWithModel:)]){ [self.delegate selectItemWithModel:model]; } diff --git a/YuMi/Modules/YMNewHome/View/PIHoemCategoryCollectionView.m b/YuMi/Modules/YMNewHome/View/PIHoemCategoryCollectionView.m index a41926f7..c8474db9 100644 --- a/YuMi/Modules/YMNewHome/View/PIHoemCategoryCollectionView.m +++ b/YuMi/Modules/YMNewHome/View/PIHoemCategoryCollectionView.m @@ -38,13 +38,13 @@ return self.titleList.count; } - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{ - PIHomeCategoryTitleModel *model = [self.titleList safeObjectAtIndex1:indexPath.row]; + PIHomeCategoryTitleModel *model = [self.titleList xpSafeObjectAtIndex:indexPath.row]; CGFloat width = model.isChecked ? model.checkedWidth : model.noCheckedWidth; return CGSizeMake(width + kGetScaleWidth(10), kGetScaleWidth(44)); } - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ PIHoemCategoryTitleCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([PIHoemCategoryTitleCell class]) forIndexPath:indexPath]; - PIHomeCategoryTitleModel *model = [self.titleList safeObjectAtIndex1:indexPath.row]; + PIHomeCategoryTitleModel *model = [self.titleList xpSafeObjectAtIndex:indexPath.row]; cell.tagModel = model; return cell; } @@ -52,7 +52,7 @@ for (PIHomeCategoryTitleModel *model in self.titleList) { model.isChecked = NO; } - PIHomeCategoryTitleModel *selectModel = [self.titleList safeObjectAtIndex1:indexPath.row]; + PIHomeCategoryTitleModel *selectModel = [self.titleList xpSafeObjectAtIndex:indexPath.row]; selectModel.isChecked = YES; [self.pi_collectionView reloadData]; @@ -69,10 +69,10 @@ - (void)setIndex:(NSInteger)index{ _index = index; for (int i = 0; i < self.titleList.count; i++) { - PIHomeCategoryTitleModel *model = [self.titleList safeObjectAtIndex1:i]; + PIHomeCategoryTitleModel *model = [self.titleList xpSafeObjectAtIndex:i]; model.isChecked = NO; } - PIHomeCategoryTitleModel *curModel = [self.titleList safeObjectAtIndex1:_index]; + PIHomeCategoryTitleModel *curModel = [self.titleList xpSafeObjectAtIndex:_index]; curModel.isChecked = YES; [self.pi_collectionView reloadData]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ diff --git a/YuMi/Modules/YMNewHome/View/Search/View/Cell/XPHomeCollectRoomTableViewCell.m b/YuMi/Modules/YMNewHome/View/Search/View/Cell/XPHomeCollectRoomTableViewCell.m index 90718c15..1f8456ff 100644 --- a/YuMi/Modules/YMNewHome/View/Search/View/Cell/XPHomeCollectRoomTableViewCell.m +++ b/YuMi/Modules/YMNewHome/View/Search/View/Cell/XPHomeCollectRoomTableViewCell.m @@ -184,9 +184,9 @@ if (_roomInfo.micUsers.count > 0) { self.micContainerView.hidden = NO; for (NSInteger i = 0; i < self.micUserArray.count; i++) { - NetImageView * imageView = [self.micUserArray safeObjectAtIndex1:i]; + NetImageView * imageView = [self.micUserArray xpSafeObjectAtIndex:i]; if (i< _roomInfo.micUsers.count) { - HomePlayMicUserModel * micUserInfo = [_roomInfo.micUsers safeObjectAtIndex1:i]; + HomePlayMicUserModel * micUserInfo = [_roomInfo.micUsers xpSafeObjectAtIndex:i]; imageView.imageUrl = micUserInfo.avatar; imageView.hidden = NO; } else { diff --git a/YuMi/Modules/YMNewHome/View/Search/View/SubView/XPHomeSearchRelateView.m b/YuMi/Modules/YMNewHome/View/Search/View/SubView/XPHomeSearchRelateView.m index f543885d..235c4681 100644 --- a/YuMi/Modules/YMNewHome/View/Search/View/SubView/XPHomeSearchRelateView.m +++ b/YuMi/Modules/YMNewHome/View/Search/View/SubView/XPHomeSearchRelateView.m @@ -70,13 +70,13 @@ if (cell == nil) { cell = [[XPSearchListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPSearchListTableViewCell class])]; } - HomeRecommendRoomModel * resultModel = [self.relateArray safeObjectAtIndex1:indexPath.row]; + HomeRecommendRoomModel * resultModel = [self.relateArray xpSafeObjectAtIndex:indexPath.row]; [cell configEveryoneData:resultModel]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - HomeRecommendRoomModel * resultModel = [self.relateArray safeObjectAtIndex1:indexPath.row]; + HomeRecommendRoomModel * resultModel = [self.relateArray xpSafeObjectAtIndex:indexPath.row]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeSearchRelateViewEnterRoom:)]) { [self.delegate xPHomeSearchRelateViewEnterRoom:resultModel.uid]; } @@ -93,7 +93,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPHomeRedommendCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeRedommendCollectionViewCell class]) forIndexPath:indexPath]; - HomeRecommendRoomModel * info = [self.recommendArray safeObjectAtIndex1:indexPath.row]; + HomeRecommendRoomModel * info = [self.recommendArray xpSafeObjectAtIndex:indexPath.row]; cell.recommendRoomInfo = info; return cell; } @@ -110,7 +110,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; if (self.recommendArray.count > 0) { - HomeRecommendRoomModel * recommend = [self.recommendArray safeObjectAtIndex1:indexPath.row]; + HomeRecommendRoomModel * recommend = [self.recommendArray xpSafeObjectAtIndex:indexPath.row]; [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_allinsearch_entry_room_click eventAttributes:@{@"roomTitle" :recommend.title}]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeSearchRelateViewEnterRoom:)]) { [self.delegate xPHomeSearchRelateViewEnterRoom:recommend.roomUid]; diff --git a/YuMi/Modules/YMNewHome/View/Search/View/XPHomeSearchViewController.m b/YuMi/Modules/YMNewHome/View/Search/View/XPHomeSearchViewController.m index 9f729576..57179316 100644 --- a/YuMi/Modules/YMNewHome/View/Search/View/XPHomeSearchViewController.m +++ b/YuMi/Modules/YMNewHome/View/Search/View/XPHomeSearchViewController.m @@ -88,7 +88,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; if (cell == nil) { cell = [[XPSearchListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPSearchListTableViewCell class])]; } - HomeSearchResultModel * resultModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + HomeSearchResultModel * resultModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; [cell configData:resultModel type:self.type]; return cell; } @@ -105,7 +105,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; [self dismissViewControllerAnimated:YES completion:nil]; - HomeSearchResultModel * resultModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + HomeSearchResultModel * resultModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (self.type == SearchType_Room) { if (resultModel.valid) { [XPRoomViewController openRoom:resultModel.uid viewController:self.presentingViewController]; diff --git a/YuMi/Modules/YMNewHome/View/Search/View/XPRoomSearchRecordViewController.m b/YuMi/Modules/YMNewHome/View/Search/View/XPRoomSearchRecordViewController.m index 266c7598..e4471c9f 100644 --- a/YuMi/Modules/YMNewHome/View/Search/View/XPRoomSearchRecordViewController.m +++ b/YuMi/Modules/YMNewHome/View/Search/View/XPRoomSearchRecordViewController.m @@ -190,34 +190,34 @@ NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey"; - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { if (collectionView == self.searchCollectionView) { XPHomeSearchRecordCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeSearchRecordCell class]) forIndexPath:indexPath]; - cell.recordString = [self.searchList safeObjectAtIndex1:indexPath.row]; + cell.recordString = [self.searchList xpSafeObjectAtIndex:indexPath.row]; return cell; } else if (collectionView == self.everyOneCollectionView) { XPHomeSearchRecordCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeSearchRecordCell class]) forIndexPath:indexPath]; - HomeEveryOneSearchModel *model = [self.everyoneSearchList safeObjectAtIndex1:indexPath.row]; + HomeEveryOneSearchModel *model = [self.everyoneSearchList xpSafeObjectAtIndex:indexPath.row]; cell.recordString = model.word; return cell; } else { XPHomeAttentionCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeAttentionCollectionViewCell class]) forIndexPath:indexPath]; - cell.recordRoom = [self.inRoomList safeObjectAtIndex1:indexPath.row]; + cell.recordRoom = [self.inRoomList xpSafeObjectAtIndex:indexPath.row]; return cell; } } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { if (collectionView == self.searchCollectionView) { - NSString *str = [self.searchList safeObjectAtIndex1:indexPath.row]; + NSString *str = [self.searchList xpSafeObjectAtIndex:indexPath.row]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomSearchRecordViewControllerSearchWithWord:)]) { [self.delegate xPRoomSearchRecordViewControllerSearchWithWord:str]; } } else if (collectionView == self.everyOneCollectionView) { - HomeEveryOneSearchModel *model = [self.everyoneSearchList safeObjectAtIndex1:indexPath.row]; + HomeEveryOneSearchModel *model = [self.everyoneSearchList xpSafeObjectAtIndex:indexPath.row]; [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_allinsearch_entry_click eventAttributes:@{@"searchWord" :model.word}]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomSearchRecordViewControllerEveryoneSearch: sid:)]) { [self.delegate xPRoomSearchRecordViewControllerEveryoneSearch:model.word sid:model.sid]; } } else { - XPMineFootPrintModel *resultModel = [self.inRoomList safeObjectAtIndex1:indexPath.row]; + XPMineFootPrintModel *resultModel = [self.inRoomList xpSafeObjectAtIndex:indexPath.row]; [self dismissViewControllerAnimated:YES completion:nil]; if (resultModel.valid) { [XPRoomViewController openRoom:resultModel.roomUid viewController:self.presentingViewController]; @@ -231,11 +231,11 @@ NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey"; - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { if (collectionView == self.searchCollectionView) { - NSString *str = [self.searchList safeObjectAtIndex1:indexPath.row]; + NSString *str = [self.searchList xpSafeObjectAtIndex:indexPath.row]; CGFloat width = [str boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:12]} context:nil].size.width; return CGSizeMake(width + 26, 26); } else if(collectionView == self.everyOneCollectionView){ - HomeEveryOneSearchModel *model = [self.everyoneSearchList safeObjectAtIndex1:indexPath.row]; + HomeEveryOneSearchModel *model = [self.everyoneSearchList xpSafeObjectAtIndex:indexPath.row]; CGFloat width = [model.word boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:12]} context:nil].size.width; return CGSizeMake(width + 26, 26); } else { diff --git a/YuMi/Modules/YMNewHome/View/XPHomePartyViewController.m b/YuMi/Modules/YMNewHome/View/XPHomePartyViewController.m index 9ea7d00f..0d95497b 100644 --- a/YuMi/Modules/YMNewHome/View/XPHomePartyViewController.m +++ b/YuMi/Modules/YMNewHome/View/XPHomePartyViewController.m @@ -105,7 +105,7 @@ return cell; } XPNewHomePartyCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPNewHomePartyCollectionViewCell class]) forIndexPath:indexPath]; - cell.roomInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.roomInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } @@ -123,7 +123,7 @@ -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ - HomePlayRoomModel * roomInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + HomePlayRoomModel * roomInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (roomInfo.uid.length > 0) { [XPRoomViewController openRoom:roomInfo.uid viewController:self]; } diff --git a/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.m b/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.m index 9d2d924a..bfb86441 100644 --- a/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.m +++ b/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.m @@ -164,7 +164,7 @@ UIKIT_EXTERN NSString * const kShieldingNotification; cell = [[XPNewHomePartyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPNewHomePartyTableViewCell class])]; } - cell.roomInfo = [self.personalRoomList safeObjectAtIndex1:indexPath.row]; + cell.roomInfo = [self.personalRoomList xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; @@ -190,7 +190,7 @@ UIKIT_EXTERN NSString * const kShieldingNotification; [tableView deselectRowAtIndexPath:indexPath animated:YES]; if(indexPath.section == 3) { if (self.personalRoomList.count > 0) { - HomePlayRoomModel * roomInfo1 = [self.personalRoomList safeObjectAtIndex1:indexPath.row]; + HomePlayRoomModel * roomInfo1 = [self.personalRoomList xpSafeObjectAtIndex:indexPath.row]; if (roomInfo1.uid.length > 0) { [XPRoomViewController openRoom:roomInfo1.uid viewController:self]; } @@ -407,7 +407,7 @@ UIKIT_EXTERN NSString * const kShieldingNotification; NSString *fileName = [[roomModel.userVoice componentsSeparatedByString:@"/"] lastObject]; - NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"kMineSoundCard"]; + NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"kMineSoundCard"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]) { [self playAudioWithUrl:fullPath isDelay:[XPSkillCardPlayerManager shareInstance].isMineInMic]; diff --git a/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m b/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m index 2dcd5af9..c275fcf2 100644 --- a/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m +++ b/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m @@ -195,7 +195,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification; -(void)headerRefresh{ [self initHttp]; - PIHomeCategoryTitleModel *tagModel = [self.tagModelList safeObjectAtIndex1:self.type]; + PIHomeCategoryTitleModel *tagModel = [self.tagModelList xpSafeObjectAtIndex:self.type]; XPHomePartyViewController *homeVC = [self.validListDict objectForKey:[NSNumber numberWithInteger:self.type]]; homeVC.tagModel = tagModel; } @@ -332,7 +332,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification; return homeV; } XPHomePartyViewController *homeVC = [[XPHomePartyViewController alloc] init]; - homeVC.tagModel = [self.tagModelList safeObjectAtIndex1:index]; + homeVC.tagModel = [self.tagModelList xpSafeObjectAtIndex:index]; [self.validListDict setObject:homeVC forKey:@(index)]; return homeVC; } diff --git a/YuMi/Modules/YMRTC/RtcImpl/ZegoRtcImpl.m b/YuMi/Modules/YMRTC/RtcImpl/ZegoRtcImpl.m index 359ee371..bb8e6856 100644 --- a/YuMi/Modules/YMRTC/RtcImpl/ZegoRtcImpl.m +++ b/YuMi/Modules/YMRTC/RtcImpl/ZegoRtcImpl.m @@ -211,7 +211,7 @@ NSString *uid = nil; NSArray *strArray = [userInfo.streamID componentsSeparatedByString:@"-"]; if (strArray.count >= 2) { - uid = [strArray safeObjectAtIndex1:1]; + uid = [strArray xpSafeObjectAtIndex:1]; if (userInfo.soundLevel > 0) { [uids addObject:uid]; } diff --git a/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelView.m b/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelView.m index a29b4260..828a34f1 100644 --- a/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelView.m +++ b/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelView.m @@ -618,7 +618,7 @@ static CGFloat MiniHeight = 130.5; self.blueAvatarImageView.imageUrl = _pkPanelInfo.aAvatar; self.blueCountLabel.text = [NSString stringWithFormat:@"%lld", _pkPanelInfo.aAmount]; for (int i = 0; i<_pkPanelInfo.csRank.count; i++) { - AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.csRank safeObjectAtIndex1:i]; + AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.csRank xpSafeObjectAtIndex:i]; if (i >= self.redContributeStackView.subviews.count) { break; } @@ -626,7 +626,7 @@ static CGFloat MiniHeight = 130.5; userView.panelInfo = rankModel; } for (int i = 0; i<_pkPanelInfo.crRank.count; i++) { - AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.crRank safeObjectAtIndex1:i]; + AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.crRank xpSafeObjectAtIndex:i]; if (i >= self.redCharmStackView.subviews.count) { break; } @@ -635,7 +635,7 @@ static CGFloat MiniHeight = 130.5; } for (int i = 0; i<_pkPanelInfo.asRank.count; i++) { - AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.asRank safeObjectAtIndex1:i]; + AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.asRank xpSafeObjectAtIndex:i]; if (i >= self.blueContributeStackView.subviews.count) { break; } @@ -644,7 +644,7 @@ static CGFloat MiniHeight = 130.5; } for (int i = 0; i<_pkPanelInfo.arRank.count; i++) { - AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.arRank safeObjectAtIndex1:i]; + AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.arRank xpSafeObjectAtIndex:i]; if (i >= self.blueCharmStackView.subviews.count) { break; } diff --git a/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKResultView.m b/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKResultView.m index cb71c959..add0f088 100644 --- a/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKResultView.m +++ b/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKResultView.m @@ -204,14 +204,14 @@ self.redValueLabel.text = [NSString stringWithFormat:@"%lld", data.cAmount]; self.blueValueLabel.text = [NSString stringWithFormat:@"%lld", data.aAmount]; if (data.csRank.count > 0) {//有贡献 - AcrossRoomPkRankModel *contributeInfo = [data.csRank safeObjectAtIndex1:0]; + AcrossRoomPkRankModel *contributeInfo = [data.csRank xpSafeObjectAtIndex:0]; self.contributeNick.text = contributeInfo.nick ? contributeInfo.nick : @""; self.contributeValue.text = [NSString stringWithFormat:@"%@:%@",YMLocalizedString(@"XPAcrossRoomPKResultView0"), contributeInfo.amount? contributeInfo.amount : @""]; self.contributeAvatar.imageUrl = contributeInfo.avatar; } if (data.crRank.count > 0) { - AcrossRoomPkRankModel *charmInfo = [data.crRank safeObjectAtIndex1:0]; + AcrossRoomPkRankModel *charmInfo = [data.crRank xpSafeObjectAtIndex:0]; self.charmNick.text = charmInfo.nick ? charmInfo.nick : @""; self.charmValue.text = [NSString stringWithFormat:@"%@:%@",YMLocalizedString(@"XPAcrossRoomPKResultView1"), charmInfo.amount? charmInfo.amount : @""]; self.charmAvatar.imageUrl = charmInfo.avatar; diff --git a/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/XPAcrossRoomPKSelectRoomView.m b/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/XPAcrossRoomPKSelectRoomView.m index 9b166a42..fef2368c 100644 --- a/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/XPAcrossRoomPKSelectRoomView.m +++ b/YuMi/Modules/YMRoom/View/AcrossRoomPK/View/XPAcrossRoomPKSelectRoomView.m @@ -193,7 +193,7 @@ cell = [[XPAcrossRoomPKTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPAcrossRoomPKTableViewCell class])]; } cell.delegate = self; - AcrossRoomPKInfoModel * pkRoomInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + AcrossRoomPKInfoModel * pkRoomInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (pkRoomInfo.uid.integerValue == self.selectRoomInfo.uid.integerValue) { pkRoomInfo.hadSelected = YES; } else { diff --git a/YuMi/Modules/YMRoom/View/ActivityContainerView/PIRoomActivityChoosePlayView.m b/YuMi/Modules/YMRoom/View/ActivityContainerView/PIRoomActivityChoosePlayView.m index 5bffff43..f5aace07 100644 --- a/YuMi/Modules/YMRoom/View/ActivityContainerView/PIRoomActivityChoosePlayView.m +++ b/YuMi/Modules/YMRoom/View/ActivityContainerView/PIRoomActivityChoosePlayView.m @@ -60,12 +60,12 @@ } - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ PIRoomActivityChoosePlayCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([PIRoomActivityChoosePlayCell class]) forIndexPath:indexPath]; - ActivityInfoModel *model = [self.playList safeObjectAtIndex1:indexPath.row]; + ActivityInfoModel *model = [self.playList xpSafeObjectAtIndex:indexPath.row]; cell.imageUrl = model.icon; return cell; } -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ - ActivityInfoModel *model = [self.playList safeObjectAtIndex1:indexPath.row]; + ActivityInfoModel *model = [self.playList xpSafeObjectAtIndex:indexPath.row]; if(self.delegate && [self.delegate respondsToSelector:@selector(choosePlayTypeWithView:model:)]){ [self.delegate choosePlayTypeWithView:self model:model]; } diff --git a/YuMi/Modules/YMRoom/View/ActivityContainerView/PIRoomActivityWebView.m b/YuMi/Modules/YMRoom/View/ActivityContainerView/PIRoomActivityWebView.m index 81ce5d78..d6deb82f 100644 --- a/YuMi/Modules/YMRoom/View/ActivityContainerView/PIRoomActivityWebView.m +++ b/YuMi/Modules/YMRoom/View/ActivityContainerView/PIRoomActivityWebView.m @@ -63,12 +63,12 @@ } - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ PIRoomActivityWebCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([PIRoomActivityWebCell class]) forIndexPath:indexPath]; - cell.infoModel = [self.infoList safeObjectAtIndex1:indexPath.row]; + cell.infoModel = [self.infoList xpSafeObjectAtIndex:indexPath.row]; cell.pi_isChoose = self.path == indexPath.row; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ - ActivityInfoModel *model = [_infoList safeObjectAtIndex1:indexPath.row]; + ActivityInfoModel *model = [_infoList xpSafeObjectAtIndex:indexPath.row]; self.webVC.url = model.skipContent; self.path = indexPath.row; [self.collectionView reloadData]; diff --git a/YuMi/Modules/YMRoom/View/AnchorPK/View/SubViews/XPAnchorPKResultView.m b/YuMi/Modules/YMRoom/View/AnchorPK/View/SubViews/XPAnchorPKResultView.m index 6e480174..ed8a09c3 100644 --- a/YuMi/Modules/YMRoom/View/AnchorPK/View/SubViews/XPAnchorPKResultView.m +++ b/YuMi/Modules/YMRoom/View/AnchorPK/View/SubViews/XPAnchorPKResultView.m @@ -284,7 +284,7 @@ self.contributeTitleLabel.hidden = NO; self.noneContrbuteLabel.hidden = YES; for (int i = 0; i= self.redContributeStackView.subviews.count) { break; } @@ -501,7 +501,7 @@ } for (int i = 0; i<_pkPanelInfo.asRank.count; i++) { - AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.asRank safeObjectAtIndex1:i]; + AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.asRank xpSafeObjectAtIndex:i]; if (i >= self.blueContributeStackView.subviews.count) { break; } diff --git a/YuMi/Modules/YMRoom/View/AnchorPK/View/XPAnchorPKSelectRoomView.m b/YuMi/Modules/YMRoom/View/AnchorPK/View/XPAnchorPKSelectRoomView.m index ffeb6381..727adc0c 100644 --- a/YuMi/Modules/YMRoom/View/AnchorPK/View/XPAnchorPKSelectRoomView.m +++ b/YuMi/Modules/YMRoom/View/AnchorPK/View/XPAnchorPKSelectRoomView.m @@ -179,7 +179,7 @@ cell = [[XPAnchorPKTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPAnchorPKTableViewCell class])]; } cell.delegate = self; - AcrossRoomPKInfoModel * pkRoomInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + AcrossRoomPKInfoModel * pkRoomInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (pkRoomInfo.uid.integerValue == self.selectRoomInfo.uid.integerValue) { pkRoomInfo.hadSelected = YES; } else { diff --git a/YuMi/Modules/YMRoom/View/AnchorView/FansTeam/View/XPAnchorFansTaskViewController.m b/YuMi/Modules/YMRoom/View/AnchorView/FansTeam/View/XPAnchorFansTaskViewController.m index 040065c9..17ee4e8b 100644 --- a/YuMi/Modules/YMRoom/View/AnchorView/FansTeam/View/XPAnchorFansTaskViewController.m +++ b/YuMi/Modules/YMRoom/View/AnchorView/FansTeam/View/XPAnchorFansTaskViewController.m @@ -270,7 +270,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { XPAnchorFansTaskTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPAnchorFansTaskTableViewCell class])]; - XPAnchorFansTaskDetailModel *model = [self.model.taskVos safeObjectAtIndex1:indexPath.row]; + XPAnchorFansTaskDetailModel *model = [self.model.taskVos xpSafeObjectAtIndex:indexPath.row]; cell.model = model; return cell; diff --git a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationHitView.m b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationHitView.m index 7ef9610e..efce0c84 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationHitView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationHitView.m @@ -12,7 +12,7 @@ - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { for (NSInteger i = (self.subviews.count - 1) ; i >= 0 ; i--) { - UIView * subView = [self.subviews safeObjectAtIndex1:i]; + UIView * subView = [self.subviews xpSafeObjectAtIndex:i]; CGPoint convertPoint = [subView convertPoint:point fromView:self]; if (CGRectContainsPoint(subView.bounds, convertPoint)) { return [subView hitTest:convertPoint withEvent:event]; diff --git a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m index c0013908..2d64d250 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m @@ -2036,7 +2036,7 @@ if ([self isInSudGame]) {return;} NSString *encodingUrl = [vggUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet]; NSString *fileName = [[encodingUrl componentsSeparatedByString:@"/"] lastObject]; - NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; + NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){ NSData *data = [NSData dataWithContentsOfFile:fullPath options:0 error:NULL]; @@ -2146,7 +2146,7 @@ - (void)playGiftEffectWithVapUrl:(NSString *)vapUrl { NSString *encodingUrl = [vapUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet]; NSString *fileName = [[encodingUrl componentsSeparatedByString:@"/"] lastObject]; - NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; + NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){ vapUrl = fullPath; @@ -2190,7 +2190,7 @@ NSString *encodingUrl = [vggUrl.absoluteString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet]; NSString *fileName = [[encodingUrl componentsSeparatedByString:@"/"] lastObject]; - NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; + NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){ NSData *data=[NSData dataWithContentsOfFile:fullPath options:0 error:NULL]; @@ -2269,7 +2269,7 @@ - (void)playLuckyGiftEffectWithVapUrl:(NSString *)vapUrl { NSString *encodingUrl = [vapUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet]; NSString *fileName = [[encodingUrl componentsSeparatedByString:@"/"] lastObject]; - NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; + NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){ vapUrl = fullPath; diff --git a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomGraffitiGiftAnimationView.m b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomGraffitiGiftAnimationView.m index 3d2ef8d8..0fd7d404 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomGraffitiGiftAnimationView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomGraffitiGiftAnimationView.m @@ -65,7 +65,7 @@ }); return; } - NSValue * valeu= [self.datasource safeObjectAtIndex1:self.index]; + NSValue * valeu= [self.datasource xpSafeObjectAtIndex:self.index]; CGPoint point = valeu.CGPointValue; UIImageView * imageView = [[UIImageView alloc] init]; imageView.layer.masksToBounds = YES; diff --git a/YuMi/Modules/YMRoom/View/ArrangeMic/View/XPArrangeMicViewController.m b/YuMi/Modules/YMRoom/View/ArrangeMic/View/XPArrangeMicViewController.m index d092e3ec..bccae14b 100644 --- a/YuMi/Modules/YMRoom/View/ArrangeMic/View/XPArrangeMicViewController.m +++ b/YuMi/Modules/YMRoom/View/ArrangeMic/View/XPArrangeMicViewController.m @@ -613,7 +613,7 @@ if (cell == nil) { cell = [[XPArrangeMicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPArrangeMicTableViewCell class])]; } - ArrangeMicUserModel * userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + ArrangeMicUserModel * userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; userInfo.arrangeMicType = self.userInfo.type; cell.isManager = self.userInfo.isManager; userInfo.number = indexPath.row + 1; diff --git a/YuMi/Modules/YMRoom/View/BackMusic/View/SubViews/XPRoomBackMusicPlayerView.m b/YuMi/Modules/YMRoom/View/BackMusic/View/SubViews/XPRoomBackMusicPlayerView.m index 195896c7..3d783579 100644 --- a/YuMi/Modules/YMRoom/View/BackMusic/View/SubViews/XPRoomBackMusicPlayerView.m +++ b/YuMi/Modules/YMRoom/View/BackMusic/View/SubViews/XPRoomBackMusicPlayerView.m @@ -136,11 +136,11 @@ UIKIT_EXTERN NSString * kRoomBackMusicPlayMusicOrderKey; if (!self.isPlaying && self.currentMusic) { self.isPlaying = [[RtcManager instance] changePlayState:BackMusicPlayState_Resume]; } else { - Music * music = [array safeObjectAtIndex1:index]; + Music * music = [array xpSafeObjectAtIndex:index]; [self playCurrentMusic:music index:index]; } } else { - Music * music = [array safeObjectAtIndex1:index]; + Music * music = [array xpSafeObjectAtIndex:index]; [self playCurrentMusic:music index:index]; } } @@ -214,7 +214,7 @@ UIKIT_EXTERN NSString * kRoomBackMusicPlayMusicOrderKey; { if (self.isPlaying == NO && self.currentMusic == nil) { NSArray * array = [[XPCoreDataManager shareInstance].managedObjectContext executeFetchRequest:self.request error:nil]; - Music * music = [array safeObjectAtIndex1:0]; + Music * music = [array xpSafeObjectAtIndex:0]; [self playCurrentMusic:music index:0]; } else { if (self.isPlaying) { @@ -229,7 +229,7 @@ UIKIT_EXTERN NSString * kRoomBackMusicPlayMusicOrderKey; { NSArray * array = [[XPCoreDataManager shareInstance].managedObjectContext executeFetchRequest:self.request error:nil]; if (self.isPlaying == NO && self.currentMusic == nil) { - Music * music = [array safeObjectAtIndex1:0]; + Music * music = [array xpSafeObjectAtIndex:0]; [self playCurrentMusic:music index:0]; } else { NSInteger index = self.currentIndex + 1; diff --git a/YuMi/Modules/YMRoom/View/BackMusic/View/XPRoomMusicLibraryViewController.m b/YuMi/Modules/YMRoom/View/BackMusic/View/XPRoomMusicLibraryViewController.m index dbeda4c5..a081cab0 100644 --- a/YuMi/Modules/YMRoom/View/BackMusic/View/XPRoomMusicLibraryViewController.m +++ b/YuMi/Modules/YMRoom/View/BackMusic/View/XPRoomMusicLibraryViewController.m @@ -113,7 +113,7 @@ UIKIT_EXTERN NSString * kRoomBackMusicCaptureVolumeKey; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { XPRoomMusicLibraryTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPRoomMusicLibraryTableViewCell class])]; - Music * musicInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + Music * musicInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (musicInfo.musicId == self.selectMusic.musicId) { cell.isSelect = YES; } else { @@ -134,7 +134,7 @@ UIKIT_EXTERN NSString * kRoomBackMusicCaptureVolumeKey; - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (self.datasource.count > 0) { - Music * musicInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + Music * musicInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; self.selectMusic = musicInfo; self.playView.music = musicInfo; [self.tableView reloadData]; @@ -185,7 +185,7 @@ UIKIT_EXTERN NSString * kRoomBackMusicCaptureVolumeKey; - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { - Music * music = [self.datasource safeObjectAtIndex1:indexPath.row]; + Music * music = [self.datasource xpSafeObjectAtIndex:indexPath.row]; [self showLoading]; if ([music.musicId isEqualToString:self.currentMusic.musicId]) { self.playView.music = nil; diff --git a/YuMi/Modules/YMRoom/View/BackMusic/View/XPRoomTransferMusicViewController.m b/YuMi/Modules/YMRoom/View/BackMusic/View/XPRoomTransferMusicViewController.m index fe76e4da..b1e2e8dd 100644 --- a/YuMi/Modules/YMRoom/View/BackMusic/View/XPRoomTransferMusicViewController.m +++ b/YuMi/Modules/YMRoom/View/BackMusic/View/XPRoomTransferMusicViewController.m @@ -214,7 +214,7 @@ static NSInteger spacing = 47 * 2; NSString *randomNum = @""; if (artists.count > 0) { - AVMetadataItem *artist = [artists safeObjectAtIndex1:0]; + AVMetadataItem *artist = [artists xpSafeObjectAtIndex:0]; singer = [artist.value copyWithZone:nil]; }else{ int64_t i = random() % 1000000000; @@ -223,14 +223,14 @@ static NSInteger spacing = 47 * 2; } if (albumNames.count > 0) { - AVMetadataItem *artist = [albumNames safeObjectAtIndex1:0]; + AVMetadataItem *artist = [albumNames xpSafeObjectAtIndex:0]; image = [UIImage imageWithData:[artist.value copyWithZone:nil]]; }else{ image = [UIImage imageNamed:@"common_avatar"]; } if (titles.count > 0) { - AVMetadataItem *artist = [titles safeObjectAtIndex1:0]; + AVMetadataItem *artist = [titles xpSafeObjectAtIndex:0]; songName = [artist.value copyWithZone:nil]; }else{ songName = YMLocalizedString(@"XPRoomTransferMusicViewController12"); diff --git a/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.m b/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.m index fb2b0fd8..71b54b00 100644 --- a/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.m +++ b/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.m @@ -194,7 +194,7 @@ - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { for (NSInteger i = (self.subviews.count - 1) ; i >= 0 ; i--) { - UIView * subView = [self.subviews safeObjectAtIndex1:i]; + UIView * subView = [self.subviews xpSafeObjectAtIndex:i]; CGPoint convertPoint = [subView convertPoint:point fromView:self]; if (CGRectContainsPoint(subView.bounds, convertPoint)) { return [subView hitTest:convertPoint withEvent:event]; diff --git a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeMoreView.m b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeMoreView.m index 41a478fa..581a0ed2 100644 --- a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeMoreView.m +++ b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeMoreView.m @@ -86,7 +86,7 @@ NSString * const kCandyTreeHideMessage = @"kCandyTreeHideMessage"; cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([UITableViewCell class])]; } cell.backgroundColor = [UIColor whiteColor]; - cell.textLabel.text = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.textLabel.text = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.textLabel.textColor = [DJDKMIMOMColor alertTitleColor]; cell.textLabel.font = [UIFont systemFontOfSize:15]; return cell; diff --git a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeRankView.m b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeRankView.m index 3d614941..9d136e78 100644 --- a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeRankView.m +++ b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeRankView.m @@ -147,7 +147,7 @@ if (cell == nil) { cell = [[XPCandyTreeRankTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPCandyTreeRankTableViewCell class])]; } - cell.roomRankModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.roomRankModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{if (self.datasource.count <= 0) {return;} diff --git a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeViewController.m b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeViewController.m index 19c42e34..717706bd 100644 --- a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeViewController.m +++ b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeViewController.m @@ -193,7 +193,7 @@ [self.animationView.subviews.firstObject removeFromSuperview]; } for (int i=0; i < self.animationView.subviews.count; i++) { - XPCandyTreeGiftView * view = [self.animationView.subviews safeObjectAtIndex1:i]; + XPCandyTreeGiftView * view = [self.animationView.subviews xpSafeObjectAtIndex:i]; NSInteger offsetY= (self.animationView.subviews.count - i) * kGetScaleWidth(23); [UIView animateWithDuration:0.1 animations:^{ CGRect rect = view.frame; diff --git a/YuMi/Modules/YMRoom/View/FaceView/Presenter/XPRoomFacePresenter.m b/YuMi/Modules/YMRoom/View/FaceView/Presenter/XPRoomFacePresenter.m index a8be8bb2..e6624b37 100644 --- a/YuMi/Modules/YMRoom/View/FaceView/Presenter/XPRoomFacePresenter.m +++ b/YuMi/Modules/YMRoom/View/FaceView/Presenter/XPRoomFacePresenter.m @@ -34,7 +34,7 @@ NSString * faceFile = [XPRoomFaceTool shareFaceTool].faceDirectory; NSMutableArray * faceArray = [NSMutableArray array]; for (int i = 0; i< sortArray.count; i++) { - RoomFaceInfoModel * faceInfo = [sortArray safeObjectAtIndex1:i]; + RoomFaceInfoModel * faceInfo = [sortArray xpSafeObjectAtIndex:i]; if (!faceInfo.isNobleFace && faceInfo.faceType == 1) { NSString *faceName = [NSString stringWithFormat:@"%@_%ld_%ld",faceInfo.pinyin,faceInfo.fid,faceInfo.iconPos]; NSString *dirName = [NSString stringWithFormat:@"%@_%ld",faceInfo.pinyin,faceInfo.fid]; @@ -58,7 +58,7 @@ NSString * faceFile = [XPRoomFaceTool shareFaceTool].faceDirectory; NSMutableArray * faceArray = [NSMutableArray array]; for (int i = 0; i< sortArray.count; i++) { - RoomFaceInfoModel * faceInfo = [sortArray safeObjectAtIndex1:i]; + RoomFaceInfoModel * faceInfo = [sortArray xpSafeObjectAtIndex:i]; if (faceInfo.faceType == 1) { NSString *faceName = [NSString stringWithFormat:@"%@_%ld_%ld",faceInfo.pinyin,faceInfo.fid,faceInfo.iconPos]; NSString *dirName = [NSString stringWithFormat:@"%@_%ld",faceInfo.pinyin,faceInfo.fid]; diff --git a/YuMi/Modules/YMRoom/View/FaceView/Presenter/XPRoomFaceTool.m b/YuMi/Modules/YMRoom/View/FaceView/Presenter/XPRoomFaceTool.m index 894c1f16..c4bbb297 100644 --- a/YuMi/Modules/YMRoom/View/FaceView/Presenter/XPRoomFaceTool.m +++ b/YuMi/Modules/YMRoom/View/FaceView/Presenter/XPRoomFaceTool.m @@ -44,7 +44,7 @@ NSString * const kRoomFaceVersion = @"kRoomFaceVersion"; - (void)downFaceDataCompletion:(nullable void (^)(NSString * nullable))completion { //获取沙盒doucument路径 NSArray*pathsss =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); - NSString *documentsDirectory = [pathsss safeObjectAtIndex1:0]; + NSString *documentsDirectory = [pathsss xpSafeObjectAtIndex:0]; NSString*faceDirectory = [documentsDirectory stringByAppendingPathComponent:@"Face"]; ///首先判断 本地的数据是否 需要更新了 NSString *version = [[NSUserDefaults standardUserDefaults]objectForKey: kRoomFaceVersion]; diff --git a/YuMi/Modules/YMRoom/View/FaceView/View/XPRoomFaceViewController.m b/YuMi/Modules/YMRoom/View/FaceView/View/XPRoomFaceViewController.m index 3e2f923e..572b3938 100644 --- a/YuMi/Modules/YMRoom/View/FaceView/View/XPRoomFaceViewController.m +++ b/YuMi/Modules/YMRoom/View/FaceView/View/XPRoomFaceViewController.m @@ -243,7 +243,7 @@ #pragma mark - UICollectionViewDelegate And UICollectionViewDatasource - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { if (collectionView == self.titleCollectionView) { - RoomFaceTitleItemModel * itemModel = [self.titleList safeObjectAtIndex1:indexPath.row]; + RoomFaceTitleItemModel * itemModel = [self.titleList xpSafeObjectAtIndex:indexPath.row]; CGSize size = [itemModel.title boundingRectWithSize:CGSizeMake(120, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading | NSStringDrawingTruncatesLastVisibleLine attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:13]} context:nil].size; return CGSizeMake(size.width + 10, size.height); @@ -262,7 +262,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { if (collectionView == self.titleCollectionView) { XPRoomFaceTitleCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPRoomFaceTitleCollectionViewCell class]) forIndexPath:indexPath]; - RoomFaceTitleItemModel * model = [self.titleList safeObjectAtIndex1:indexPath.item]; + RoomFaceTitleItemModel * model = [self.titleList xpSafeObjectAtIndex:indexPath.item]; if (model == self.selectTitleItem) { model.isSelect = YES; } else { @@ -275,9 +275,9 @@ XPRoomFaceCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPRoomFaceCollectionViewCell class]) forIndexPath:indexPath]; RoomFaceInfoModel * faceInfo; if (self.selectTitleItem.faceType == RoomFaceTitleItemType_Normal) { - faceInfo = [self.faceList safeObjectAtIndex1:indexPath.row]; + faceInfo = [self.faceList xpSafeObjectAtIndex:indexPath.row]; } else { - faceInfo = [self.nobelFaceList safeObjectAtIndex1:indexPath.row]; + faceInfo = [self.nobelFaceList xpSafeObjectAtIndex:indexPath.row]; } cell.vipLevel = self.userInfo.userVipInfoVO.vipLevel; cell.faceInfo =faceInfo; @@ -286,7 +286,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { if (collectionView == self.titleCollectionView) { - RoomFaceTitleItemModel * titleModel = [self.titleList safeObjectAtIndex1:indexPath.row]; + RoomFaceTitleItemModel * titleModel = [self.titleList xpSafeObjectAtIndex:indexPath.row]; self.selectTitleItem = titleModel; [self.titleCollectionView reloadData]; NSArray * list = titleModel.faceType == RoomFaceTitleItemType_Normal ? self.faceList : self.nobelFaceList; @@ -294,11 +294,11 @@ [self.faceCollectionView reloadData]; } else { if (self.selectTitleItem.faceType == RoomFaceTitleItemType_Normal) { - RoomFaceInfoModel * faceInfo = [self.faceList safeObjectAtIndex1:indexPath.row]; + RoomFaceInfoModel * faceInfo = [self.faceList xpSafeObjectAtIndex:indexPath.row]; [self sendFaceCustomMessage:faceInfo]; } else { if (indexPath.row < self.nobelFaceList.count) { - RoomFaceInfoModel * faceInfo = [self.nobelFaceList safeObjectAtIndex1:indexPath.row]; + RoomFaceInfoModel * faceInfo = [self.nobelFaceList xpSafeObjectAtIndex:indexPath.row]; if (faceInfo.faceVipInfo.vipLevel > self.userInfo.userVipInfoVO.vipLevel) { TTAlertConfig *config = [[TTAlertConfig alloc] init]; config.message = [NSString stringWithFormat:YMLocalizedString(@"XPRoomFaceViewController1"), faceInfo.name,faceInfo.faceVipInfo.vipName]; diff --git a/YuMi/Modules/YMRoom/View/FirstRecharge/View/XPFirstRechargeSuccessView.m b/YuMi/Modules/YMRoom/View/FirstRecharge/View/XPFirstRechargeSuccessView.m index e7258405..c6b05862 100644 --- a/YuMi/Modules/YMRoom/View/FirstRecharge/View/XPFirstRechargeSuccessView.m +++ b/YuMi/Modules/YMRoom/View/FirstRecharge/View/XPFirstRechargeSuccessView.m @@ -108,7 +108,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPFirstRechargeCollectionViewCell * cell= [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPFirstRechargeCollectionViewCell class]) forIndexPath:indexPath]; - cell.rewardInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.rewardInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } diff --git a/YuMi/Modules/YMRoom/View/FirstRecharge/View/XPFirstRechargeView.m b/YuMi/Modules/YMRoom/View/FirstRecharge/View/XPFirstRechargeView.m index d638a0d0..1958334a 100644 --- a/YuMi/Modules/YMRoom/View/FirstRecharge/View/XPFirstRechargeView.m +++ b/YuMi/Modules/YMRoom/View/FirstRecharge/View/XPFirstRechargeView.m @@ -217,14 +217,14 @@ if (array.count <= 0) return; self.typeArrowView.hidden = NO; self.originArray = array; - self.currentInfo = [array safeObjectAtIndex1:0]; + self.currentInfo = [array xpSafeObjectAtIndex:0]; if (self.segmentView.arrangedSubviews.count > 0) { [[self.segmentView arrangedSubviews] enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { [obj removeFromSuperview]; }]; } for (int i = 0 ; i < array.count; i++) { - FirstRechargeModel * modelInfo = [array safeObjectAtIndex1:i]; + FirstRechargeModel * modelInfo = [array xpSafeObjectAtIndex:i]; NSString * title = [NSString stringWithFormat:@"$%.2f", modelInfo.chargeMoney]; UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom]; [button setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected]; @@ -273,7 +273,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPFirstRechargeCollectionViewCell * cell= [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPFirstRechargeCollectionViewCell class]) forIndexPath:indexPath]; - cell.rewardInfo = [self.rewardArray safeObjectAtIndex1:indexPath.row]; + cell.rewardInfo = [self.rewardArray xpSafeObjectAtIndex:indexPath.row]; return cell; } @@ -503,7 +503,7 @@ } - (void)buttonAction:(UIButton *)sender { if (sender.tag <= self.originArray.count) { - FirstRechargeModel * model = [self.originArray safeObjectAtIndex1:sender.tag]; + FirstRechargeModel * model = [self.originArray xpSafeObjectAtIndex:sender.tag]; self.currentInfo = model; [self createExtraRewardAttrebute:model]; self.rewardArray = model.firstChargeRewardList; @@ -521,7 +521,7 @@ [[self.segmentView arrangedSubviews] enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { UIButton * button = obj; if (button.tag <= self.originArray.count) { - FirstRechargeModel * model = [self.originArray safeObjectAtIndex1:sender.tag]; + FirstRechargeModel * model = [self.originArray xpSafeObjectAtIndex:sender.tag]; [self createExtraRewardAttrebute:model]; } button.selected = NO; diff --git a/YuMi/Modules/YMRoom/View/LittleGame/Presenter/Category/NSString+RW.m b/YuMi/Modules/YMRoom/View/LittleGame/Presenter/Category/NSString+RW.m index 2e7f7353..c552460c 100644 --- a/YuMi/Modules/YMRoom/View/LittleGame/Presenter/Category/NSString+RW.m +++ b/YuMi/Modules/YMRoom/View/LittleGame/Presenter/Category/NSString+RW.m @@ -245,7 +245,7 @@ [reString appendString:@"{"]; NSMutableArray *keyValues = [NSMutableArray array]; for(int i=0; i<[keys count]; i++) { - NSString *name = [keys safeObjectAtIndex1:i]; + NSString *name = [keys xpSafeObjectAtIndex:i]; id valueObj = [dictionary objectForKey:name]; NSString *value = [NSString jsonStringWithObject:valueObj]; if(value) { diff --git a/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameMiniStageView.m b/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameMiniStageView.m index b98b4a70..fba8233c 100644 --- a/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameMiniStageView.m +++ b/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameMiniStageView.m @@ -82,7 +82,7 @@ UIKIT_EXTERN NSString * const kRoomRoomLittleGameMiniStageNotificationKey; - (void)needRefreshPosition:(NSMutableDictionary *)micQueue { for (int i = 0; i 0) { diff --git a/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameRoomListView.m b/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameRoomListView.m index 454fda2f..97e3bd48 100644 --- a/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameRoomListView.m +++ b/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameRoomListView.m @@ -68,7 +68,7 @@ - (NSArray *)handleGameListData:(NSArray *)array { NSMutableArray * dataArray= [NSMutableArray array]; for (int i = 0; i 0) { self.tableView.hidden = YES; - LittleGameInfoModel *info = [self.datasource safeObjectAtIndex1:indexPath.row]; + LittleGameInfoModel *info = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (info.mgId.integerValue != self.mgId.integerValue) { if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomLittleGameListView:didSelectItem:)]) { [self.delegate xPRoomLittleGameListView:self didSelectItem:info]; diff --git a/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameRoomOpenView.m b/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameRoomOpenView.m index 653c5f5f..f79fec6d 100644 --- a/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameRoomOpenView.m +++ b/YuMi/Modules/YMRoom/View/LittleGame/View/XPLittleGameRoomOpenView.m @@ -158,7 +158,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPCreateLittleGameCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPCreateLittleGameCollectionViewCell class]) forIndexPath:indexPath]; - LittleGameInfoModel * gameInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + LittleGameInfoModel * gameInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (gameInfo.mgId == self.selectGameInfo.mgId) { gameInfo.isSelect = YES; } else { @@ -170,7 +170,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; - LittleGameInfoModel * gameInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + LittleGameInfoModel * gameInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; self.selectGameInfo = gameInfo; [self.collectionView reloadData]; self.createRoomButton.enabled = YES; diff --git a/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.m b/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.m index f838c034..2c64dfcf 100644 --- a/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.m +++ b/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.m @@ -98,9 +98,9 @@ static const NSInteger kItemsPerRow = 5; MSRoomMenuGameCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([MSRoomMenuGameCell class]) forIndexPath:indexPath]; if (_littleGameList.count > 0){ - cell.littleGameModel = [self.littleGameList safeObjectAtIndex1:indexPath.row]; + cell.littleGameModel = [self.littleGameList xpSafeObjectAtIndex:indexPath.row]; } else { - id model = [self.playList safeObjectAtIndex1:indexPath.row]; + id model = [self.playList xpSafeObjectAtIndex:indexPath.row]; if ([model isKindOfClass:[XPRoomMoreItemModel class]]) { cell.moreItemModel = model; } else if ([model isKindOfClass:[ActivityInfoModel class]]) { @@ -115,12 +115,12 @@ static const NSInteger kItemsPerRow = 5; if (self.littleGameList != nil && self.littleGameList.count > 0 && [self.delegate respondsToSelector:@selector(ms_didSelectLittleGameItemAtIndexPath:)]) { - [self.delegate ms_didSelectLittleGameItemAtIndexPath:[self.littleGameList safeObjectAtIndex1:indexPath.row]]; + [self.delegate ms_didSelectLittleGameItemAtIndexPath:[self.littleGameList xpSafeObjectAtIndex:indexPath.row]]; } else if (self.playList != nil && self.playList.count > 0 && [self.delegate respondsToSelector:@selector(ms_didSelectItemAtIndexPath:)]) { - [self.delegate ms_didSelectItemAtIndexPath:[self.playList safeObjectAtIndex1:indexPath.row]]; + [self.delegate ms_didSelectItemAtIndexPath:[self.playList xpSafeObjectAtIndex:indexPath.row]]; } } } diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/MsRoomMessagChatHallView.m b/YuMi/Modules/YMRoom/View/MessageContainerView/MsRoomMessagChatHallView.m index f47cfd62..a4d95961 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/MsRoomMessagChatHallView.m +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/MsRoomMessagChatHallView.m @@ -454,7 +454,7 @@ //} - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - XPMessageInfoModel* attr = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMessageInfoModel* attr = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if(attr.first == CustomMessageType_Room_Album){ PIRoomMessagePhotoAlbumCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([PIRoomMessagePhotoAlbumCell class])]; cell.delegate = self; diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m index e4210680..9db7247f 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m @@ -684,7 +684,7 @@ RoomPKTeamModel * blueTeam; RoomPKTeamModel * redTeam; for (int i = 0 ; i < model.teams.count; i++) { - RoomPKTeamModel * team = [model.teams safeObjectAtIndex1:i]; + RoomPKTeamModel * team = [model.teams xpSafeObjectAtIndex:i]; if (team.team == GroupType_Red) { redTeam = team; }else{ @@ -718,7 +718,7 @@ RoomPKTeamModel * victoryTeam; RoomPKTeamModel * failTeam; for (int i = 0 ; i < model.teams.count; i++) { - RoomPKTeamModel * team = [model.teams safeObjectAtIndex1:i]; + RoomPKTeamModel * team = [model.teams xpSafeObjectAtIndex:i]; if (team.team == (GroupType)model.result) { victoryTeam = team; }else{ @@ -792,7 +792,7 @@ if ([attachment.data[@"data"] isKindOfClass:[NSArray class]]) { NSArray * array = [RoomFaceSendInfoModel modelsWithArray:attachment.data[@"data"]]; for (int i = 0; i< array.count; i++) { - RoomFaceSendInfoModel * sendFaceInfo = [array safeObjectAtIndex1:i]; + RoomFaceSendInfoModel * sendFaceInfo = [array xpSafeObjectAtIndex:i]; [attribute appendAttributedString:[self createTextAttribute:sendFaceInfo.nick color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]]; [attribute appendAttributedString:[self createTextAttribute:@":" color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]]; [attribute appendAttributedString:[self createTextAttribute:@"\n" color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]]; @@ -1113,7 +1113,7 @@ [attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser98") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]]; [attribute appendAttributedString:[self createSapceAttribute:2]]; for (int i = 0; i < info.targetUsers.count; i++) { - GiftReceiveUserInfoModel *targetInfo = [info.targetUsers safeObjectAtIndex1:i]; + GiftReceiveUserInfoModel *targetInfo = [info.targetUsers xpSafeObjectAtIndex:i]; //nick [attribute appendAttributedString:[self createNickAtrribute:targetInfo.nick uid:targetInfo.uid]]; [attribute appendAttributedString:[self createSapceAttribute:2]]; diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/View/XPNetImageYYLabel.m b/YuMi/Modules/YMRoom/View/MessageContainerView/View/XPNetImageYYLabel.m index 0189fa10..4b2557cb 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/View/XPNetImageYYLabel.m +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/View/XPNetImageYYLabel.m @@ -18,10 +18,10 @@ YYTextLayout * layout = [YYTextLayout layoutWithContainerSize:maxSize text:attributedText]; for (int i = 0; i< layout.attachments.count; i++) { - YYTextAttachment * attachment = [layout.attachments safeObjectAtIndex1:i]; + YYTextAttachment * attachment = [layout.attachments xpSafeObjectAtIndex:i]; if (!attachment || ![attachment.content isKindOfClass:[NetImageView class]]) continue; NetImageView* imageView = attachment.content; - NSValue * value = [layout.attachmentRanges safeObjectAtIndex1:i]; + NSValue * value = [layout.attachmentRanges xpSafeObjectAtIndex:i]; NSRange range = value.rangeValue; if (!imageView.imageUrl) continue; diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m b/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m index 7a3a6590..61e8cd3e 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m @@ -394,7 +394,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey"; if ([attachment.data[@"data"] isKindOfClass:[NSArray class]]) { NSArray * array = [RoomFaceSendInfoModel modelsWithArray:attachment.data[@"data"]]; for (int i = 0; i< array.count; i++) { - RoomFaceSendInfoModel * sendInfo = [array safeObjectAtIndex1:i]; + RoomFaceSendInfoModel * sendInfo = [array xpSafeObjectAtIndex:i]; if (sendInfo.resultIndexes.count <=0) { return NO; } @@ -1009,7 +1009,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey"; //} - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - XPMessageInfoModel* attr = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMessageInfoModel* attr = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if(attr.first == CustomMessageType_Room_Album){ PIRoomMessagePhotoAlbumCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([PIRoomMessagePhotoAlbumCell class])]; cell.delegate = self; diff --git a/YuMi/Modules/YMRoom/View/MoreView/View/XPRoomMoreMenuViewController.m b/YuMi/Modules/YMRoom/View/MoreView/View/XPRoomMoreMenuViewController.m index 03af5bd1..785d1e76 100644 --- a/YuMi/Modules/YMRoom/View/MoreView/View/XPRoomMoreMenuViewController.m +++ b/YuMi/Modules/YMRoom/View/MoreView/View/XPRoomMoreMenuViewController.m @@ -238,13 +238,13 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey; - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPRoomMoreMenuCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPRoomMoreMenuCollectionViewCell class]) forIndexPath:indexPath]; - cell.itemModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.itemModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; - XPRoomMoreItemModel * item = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPRoomMoreItemModel * item = [self.datasource xpSafeObjectAtIndex:indexPath.row]; NSString * roomUid = [NSString stringWithFormat:@"%ld",self.roomInfo.uid]; NSString * roomId = [NSString stringWithFormat:@"%ld", self.roomInfo.roomId]; switch (item.type) { diff --git a/YuMi/Modules/YMRoom/View/NewUserGreet/XPRoomNewUserGreetView.m b/YuMi/Modules/YMRoom/View/NewUserGreet/XPRoomNewUserGreetView.m index d7efca2b..46175d56 100644 --- a/YuMi/Modules/YMRoom/View/NewUserGreet/XPRoomNewUserGreetView.m +++ b/YuMi/Modules/YMRoom/View/NewUserGreet/XPRoomNewUserGreetView.m @@ -114,7 +114,7 @@ } for (int i = 0; i < sayHelloUserAvatarList.count; i++) { - NSString * avatar = [sayHelloUserAvatarList safeObjectAtIndex1:i]; + NSString * avatar = [sayHelloUserAvatarList xpSafeObjectAtIndex:i]; NetImageView * avatarImageView = [[NetImageView alloc] init]; NetImageConfig * config = [[NetImageConfig alloc]init]; config.imageType = ImageTypeUserIcon; diff --git a/YuMi/Modules/YMRoom/View/QuickMessageView/XPRoomQuickMessageContainView.m b/YuMi/Modules/YMRoom/View/QuickMessageView/XPRoomQuickMessageContainView.m index 666725f7..38dc8ff3 100644 --- a/YuMi/Modules/YMRoom/View/QuickMessageView/XPRoomQuickMessageContainView.m +++ b/YuMi/Modules/YMRoom/View/QuickMessageView/XPRoomQuickMessageContainView.m @@ -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]; } } diff --git a/YuMi/Modules/YMRoom/View/ReleaseRadio/View/XPReleaseRadioViewController.m b/YuMi/Modules/YMRoom/View/ReleaseRadio/View/XPReleaseRadioViewController.m index 3cc779fc..0a5723b3 100644 --- a/YuMi/Modules/YMRoom/View/ReleaseRadio/View/XPReleaseRadioViewController.m +++ b/YuMi/Modules/YMRoom/View/ReleaseRadio/View/XPReleaseRadioViewController.m @@ -115,7 +115,7 @@ static NSString *const KXPReleaseRadioTableViewCellIdentifier = @"KXPReleaseRadi - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { XPReleaseRadioTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:KXPReleaseRadioTableViewCellIdentifier]; - cell.title = [self.model.recommends safeObjectAtIndex1:indexPath.row]; + cell.title = [self.model.recommends xpSafeObjectAtIndex:indexPath.row]; cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.delegate = self; return cell; @@ -132,7 +132,7 @@ static NSString *const KXPReleaseRadioTableViewCellIdentifier = @"KXPReleaseRadi #pragma mark - XPReleaseRadioTableViewCellDelegate - (void)xPReleaseRadioTableViewCellDidSelectCell:(XPReleaseRadioTableViewCell *)cell { NSIndexPath *indexPath = [self.tableView indexPathForCell:cell]; - self.radioTextView.text = [self.model.recommends safeObjectAtIndex1:indexPath.row]; + self.radioTextView.text = [self.model.recommends xpSafeObjectAtIndex:indexPath.row]; [self.radioTextView endEditing:YES]; } diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.m index 87fa144c..038ade41 100644 --- a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.m +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.m @@ -102,7 +102,7 @@ } - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { for (NSInteger i = (self.subviews.count - 1) ; i >= 0 ; i--) { - UIView * subView = [self.subviews safeObjectAtIndex1:i]; + UIView * subView = [self.subviews xpSafeObjectAtIndex:i]; CGPoint convertPoint = [subView convertPoint:point fromView:self]; if (CGRectContainsPoint(subView.bounds, convertPoint)) { return [subView hitTest:convertPoint withEvent:event]; diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.m index e3939507..ddeaad2c 100644 --- a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.m +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.m @@ -290,7 +290,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - XPMessageInfoModel* attr = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMessageInfoModel* attr = [self.datasource xpSafeObjectAtIndex:indexPath.row]; XPRoomMessageTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPRoomMessageTableViewCell class])]; cell.delegate = self; diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameVictoryView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameVictoryView.m index b6653869..55f89016 100644 --- a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameVictoryView.m +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameVictoryView.m @@ -76,7 +76,7 @@ } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ MSRoomGameVictoryCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MSRoomGameVictoryCell class]) forIndexPath:indexPath]; - cell.resultsModel = [self.resultsList safeObjectAtIndex1:indexPath.row]; + cell.resultsModel = [self.resultsList xpSafeObjectAtIndex:indexPath.row]; return cell; } -(void)closeBtnAction{ diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameView.m index aa26fedd..b6e6ffd6 100644 --- a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameView.m +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSTabbarRoomGameView.m @@ -50,11 +50,11 @@ } - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ MSTabbarRoomGameCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([MSTabbarRoomGameCell class]) forIndexPath:indexPath]; - cell.itemMode = [self.gameModel.gameModes safeObjectAtIndex1:indexPath.row]; + cell.itemMode = [self.gameModel.gameModes xpSafeObjectAtIndex:indexPath.row]; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ - MSTabbarRoomGameItemModel *itemModel = [self.gameModel.gameModes safeObjectAtIndex1:indexPath.row]; + MSTabbarRoomGameItemModel *itemModel = [self.gameModel.gameModes xpSafeObjectAtIndex:indexPath.row]; if(self.delegate && [self.delegate respondsToSelector:@selector(chooseGameType:)]){ [self.delegate chooseGameType:itemModel]; } diff --git a/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKPanelUserView.m b/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKPanelUserView.m index 26bc7d19..43dcba1f 100644 --- a/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKPanelUserView.m +++ b/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKPanelUserView.m @@ -109,9 +109,9 @@ self.userView.hidden = NO; self.addButton.hidden = YES; for (int i = 0 ; i< self.viewArray.count; i++) { - NetImageView * view = [self.viewArray safeObjectAtIndex1:i]; + NetImageView * view = [self.viewArray xpSafeObjectAtIndex:i]; if (i < self.userArray.count) { - RoomPKChooseUserModel * userInfo = [self.userArray safeObjectAtIndex1:i]; + RoomPKChooseUserModel * userInfo = [self.userArray xpSafeObjectAtIndex:i]; view.hidden = NO; view.imageUrl = userInfo.avatar; } else { diff --git a/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKRecordNickView.m b/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKRecordNickView.m index 9728e65a..3b9235c7 100644 --- a/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKRecordNickView.m +++ b/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKRecordNickView.m @@ -135,8 +135,8 @@ self.lineImageView.hidden = NO; } for (int i = 0; i < _userList.count; i++) { - RoomPKTeamUserModel * userInfo = [_userList safeObjectAtIndex1:i]; - UILabel * label = [self.viewArray safeObjectAtIndex1:i]; + RoomPKTeamUserModel * userInfo = [_userList xpSafeObjectAtIndex:i]; + UILabel * label = [self.viewArray xpSafeObjectAtIndex:i]; label.text = userInfo.nick; } } diff --git a/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKSelectUserView.m b/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKSelectUserView.m index ec6e9e5d..f420abd8 100644 --- a/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKSelectUserView.m +++ b/YuMi/Modules/YMRoom/View/RoomPK/View/SubViews/XPRoomPKSelectUserView.m @@ -122,15 +122,17 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPRoomPKUserCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPRoomPKUserCollectionViewCell class]) forIndexPath:indexPath]; - RoomPKChooseUserModel * model = [self.userPositionArray safeObjectAtIndex1:indexPath.row]; + RoomPKChooseUserModel * model = [self.userPositionArray xpSafeObjectAtIndex:indexPath.row]; cell.userInfo = model; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; - RoomPKChooseUserModel * model = [self.userPositionArray safeObjectAtIndex1:indexPath.row]; - if (!model.isEnableChoose) {return;} + RoomPKChooseUserModel * model = [self.userPositionArray xpSafeObjectAtIndex:indexPath.row]; + if (!model.isEnableChoose) { + return; + } if (model.uid.length > 0) { model.isSelect = !model.isSelect; __block RoomPKChooseUserModel * selectModel; @@ -211,12 +213,12 @@ - (void)setMicroQueueArray:(NSArray *)microQueueArray { _microQueueArray = microQueueArray; for (int i = 0; i< microQueueArray.count; i++) { - MicroQueueModel * microModel = [microQueueArray safeObjectAtIndex1:i]; + MicroQueueModel * microModel = [microQueueArray xpSafeObjectAtIndex:i]; if (microModel.userInfo && microModel.userInfo.uid > 0) { int position = microModel.microState.position; if (position < self.userPositionArray.count) { - RoomPKChooseUserModel * userInfoModel = [self.userPositionArray safeObjectAtIndex1:position]; + RoomPKChooseUserModel * userInfoModel = [self.userPositionArray xpSafeObjectAtIndex:position]; userInfoModel.title = microModel.userInfo.nick; userInfoModel.avatar = microModel.userInfo.avatar; userInfoModel.uid = [NSString stringWithFormat:@"%ld", microModel.userInfo.uid]; @@ -226,28 +228,28 @@ userInfoModel.isEnableChoose = YES; if (self.groupType == GroupType_Red) { for (int i = 0; i 0) { UserInfoModel * userInfo = micModel.userInfo; if (userInfo.groupType == GroupType_Red) { diff --git a/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKProgressView.m b/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKProgressView.m index e340990a..8bb1cd61 100644 --- a/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKProgressView.m +++ b/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKProgressView.m @@ -251,11 +251,11 @@ NSMutableArray * blueArray = [NSMutableArray array]; if (self.roomPKInfo.pkStatus == RoomPKStatusType_Playing) { for (int i = 0; i < self.roomPKInfo.teams.count; i++) { - RoomPKTeamModel * teamInfo = [self.roomPKInfo.teams safeObjectAtIndex1:i]; + RoomPKTeamModel * teamInfo = [self.roomPKInfo.teams xpSafeObjectAtIndex:i]; if (teamInfo.team == GroupType_Red) { self.redTeamScore = teamInfo.score; for (int i = 0; i < teamInfo.teamMembers.count; i++) { - RoomPKTeamUserModel * teamUserModel = [teamInfo.teamMembers safeObjectAtIndex1:i]; + RoomPKTeamUserModel * teamUserModel = [teamInfo.teamMembers xpSafeObjectAtIndex:i]; RoomPKChooseUserModel * redInfo = [[RoomPKChooseUserModel alloc] init]; redInfo.avatar = teamUserModel.avatar; redInfo.uid = teamUserModel.uid; @@ -267,7 +267,7 @@ } else if(teamInfo.team == GroupType_Blue) { self.blueTeamScore = teamInfo.score; for (int i = 0; i < teamInfo.teamMembers.count; i++) { - RoomPKTeamUserModel * teamUserModel = [teamInfo.teamMembers safeObjectAtIndex1:i]; + RoomPKTeamUserModel * teamUserModel = [teamInfo.teamMembers xpSafeObjectAtIndex:i]; RoomPKChooseUserModel * blueInfo = [[RoomPKChooseUserModel alloc] init]; blueInfo.avatar = teamUserModel.avatar; blueInfo.uid = teamUserModel.uid; @@ -281,7 +281,7 @@ [self configRedTeamScore:self.redTeamScore blueTeamScore:self.blueTeamScore]; } else { for (int i = 0 ; i < queue.allValues.count; i++) { - MicroQueueModel * micModel = [queue.allValues safeObjectAtIndex1:i]; + MicroQueueModel * micModel = [queue.allValues xpSafeObjectAtIndex:i]; if (micModel.userInfo && micModel.userInfo.uid > 0) { UserInfoModel * userInfo = micModel.userInfo; if (userInfo.groupType == GroupType_Red) { @@ -438,7 +438,7 @@ - (BOOL)isOnMicro:(NSString *)uid { for (int i = 0; i < self.micQueue.allValues.count; i++) { - MicroQueueModel * micModel = [self.micQueue.allValues safeObjectAtIndex1:i]; + MicroQueueModel * micModel = [self.micQueue.allValues xpSafeObjectAtIndex:i]; if (micModel.userInfo && micModel.userInfo.uid > 0 && micModel.userInfo.uid == uid.integerValue) { return YES; } @@ -643,7 +643,7 @@ - (NSString *)roomPKTeamJsonString { NSMutableArray * teamArray = [NSMutableArray array]; for (int i = 0; i < self.redChooseArray.count; i++) { - RoomPKChooseUserModel * userInfo = [self.redChooseArray safeObjectAtIndex1:i]; + RoomPKChooseUserModel * userInfo = [self.redChooseArray xpSafeObjectAtIndex:i]; NSMutableDictionary * redDic = [NSMutableDictionary dictionary]; [redDic setObject:userInfo.uid forKey:@"uid"]; [redDic setObject:@(userInfo.groupType) forKey:@"type"]; @@ -651,7 +651,7 @@ } for (int i = 0; i < self.blueChooseArray.count; i++) { - RoomPKChooseUserModel * userInfo = [self.blueChooseArray safeObjectAtIndex1:i]; + RoomPKChooseUserModel * userInfo = [self.blueChooseArray xpSafeObjectAtIndex:i]; NSMutableDictionary * blueDic = [NSMutableDictionary dictionary]; [blueDic setObject:userInfo.uid forKey:@"uid"]; [blueDic setObject:@(userInfo.groupType) forKey:@"type"]; @@ -795,7 +795,7 @@ if (self.redChooseArray.count > 0 || self.blueChooseArray.count > 0) { NSMutableDictionary * dic = [NSMutableDictionary dictionary]; for (int i = 0 ; i< self.redChooseArray.count; i++) { - RoomPKChooseUserModel * model = [self.redChooseArray safeObjectAtIndex1:i]; + RoomPKChooseUserModel * model = [self.redChooseArray xpSafeObjectAtIndex:i]; if (model.uid.integerValue <= 0) { continue; @@ -811,7 +811,7 @@ } for (int i = 0 ; i< self.blueChooseArray.count; i++) { - RoomPKChooseUserModel * model = [self.blueChooseArray safeObjectAtIndex1:i]; + RoomPKChooseUserModel * model = [self.blueChooseArray xpSafeObjectAtIndex:i]; if (model.uid.integerValue <= 0 ) { continue; } @@ -944,7 +944,7 @@ NSMutableArray * redArray = [NSMutableArray array]; NSMutableArray * blueArray = [NSMutableArray array]; for (int i = 0 ; i < _micQueue.allValues.count; i++) { - MicroQueueModel * micModel = [_micQueue.allValues safeObjectAtIndex1:i]; + MicroQueueModel * micModel = [_micQueue.allValues xpSafeObjectAtIndex:i]; if (micModel.userInfo && micModel.userInfo.uid > 0) { UserInfoModel * userInfo = micModel.userInfo; if (userInfo.groupType == GroupType_Red) { diff --git a/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKRecordViewController.m b/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKRecordViewController.m index 662c5c61..ffba4ef4 100644 --- a/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKRecordViewController.m +++ b/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKRecordViewController.m @@ -106,7 +106,7 @@ if (cell == nil) { cell = [[XPRoomPKRecordTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomPKRecordTableViewCell class])]; } - RoomPKRecordModel * recordModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomPKRecordModel * recordModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.pkDetailInfo = recordModel; return cell; } diff --git a/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKResultView.m b/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKResultView.m index 110d1785..f1bce8ff 100644 --- a/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKResultView.m +++ b/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKResultView.m @@ -209,9 +209,9 @@ - (void)loadTeamMemberUserAvatar:(NSArray *)members mvpUserId:(NSInteger)mvpUserId{ self.mvpImageView.hidden = YES; for (int i = 0; i< self.userViewArray.count; i++) { - NetImageView * imageView = [self.userViewArray safeObjectAtIndex1:i]; + NetImageView * imageView = [self.userViewArray xpSafeObjectAtIndex:i]; if (i < members.count) { - RoomPKTeamUserModel * userInfo = [members safeObjectAtIndex1:i]; + RoomPKTeamUserModel * userInfo = [members xpSafeObjectAtIndex:i]; imageView.imageUrl = userInfo.avatar; imageView.hidden = NO; if (mvpUserId == userInfo.uid.integerValue) { diff --git a/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKViewController.m b/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKViewController.m index 84cec5b2..28bf4544 100644 --- a/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKViewController.m +++ b/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKViewController.m @@ -88,8 +88,8 @@ self.duraTime = 30; self.voteType = RoomPKVoteModeType_GiftValue; NSArray * array = self.hostDelegate.getRoomPKGroupTeamList; - self.redUserArray = [NSMutableArray arrayWithArray:[array safeObjectAtIndex1:0]]; - self.blueUserArray = [NSMutableArray arrayWithArray:[array safeObjectAtIndex1:1]]; + self.redUserArray = [NSMutableArray arrayWithArray:[array xpSafeObjectAtIndex:0]]; + self.blueUserArray = [NSMutableArray arrayWithArray:[array xpSafeObjectAtIndex:1]]; for (RoomPKChooseUserModel * userInfo in self.redUserArray) { userInfo.groupType = GroupType_default; } @@ -261,14 +261,14 @@ if (self.redUserArray.count > 0) { for (int i = 0; i< self.redTeamViews.count; i++) { - XPRoomPKUserView * userView = [self.redTeamViews safeObjectAtIndex1:i]; + XPRoomPKUserView * userView = [self.redTeamViews xpSafeObjectAtIndex:i]; userView.userInfo = nil; } } if (self.blueUserArray.count > 0) { for (int i = 0; i< self.blueTeamViews.count; i++) { - XPRoomPKUserView * userView = [self.blueTeamViews safeObjectAtIndex1:i]; + XPRoomPKUserView * userView = [self.blueTeamViews xpSafeObjectAtIndex:i]; userView.userInfo = nil; } } @@ -276,9 +276,9 @@ NSMutableArray *redArray = [[NSMutableArray alloc]initWithArray:self.redUserArray]; for (int i = 0; i < redArray.count; i++) { - RoomPKChooseUserModel * userInfo = [redArray safeObjectAtIndex1:i]; + RoomPKChooseUserModel * userInfo = [redArray xpSafeObjectAtIndex:i]; if (i < self.redTeamViews.count) { - XPRoomPKUserView * userView = [self.redTeamViews safeObjectAtIndex1:i]; + XPRoomPKUserView * userView = [self.redTeamViews xpSafeObjectAtIndex:i]; if (userInfo.groupType == GroupType_Red) { userView.userInfo = userInfo; } else { @@ -289,9 +289,9 @@ } NSMutableArray *blueUserArray = [[NSMutableArray alloc]initWithArray:self.blueUserArray]; for (int i = 0; i < blueUserArray.count; i++) { - RoomPKChooseUserModel * userInfo = [blueUserArray safeObjectAtIndex1:i]; + RoomPKChooseUserModel * userInfo = [blueUserArray xpSafeObjectAtIndex:i]; if (i < self.blueTeamViews.count) { - XPRoomPKUserView * userView = [self.blueTeamViews safeObjectAtIndex1:i]; + XPRoomPKUserView * userView = [self.blueTeamViews xpSafeObjectAtIndex:i]; if (userInfo.groupType == GroupType_Blue) { userView.userInfo = userInfo; } else { @@ -318,7 +318,7 @@ if (self.redUserArray.count > 0 || self.blueUserArray.count > 0) { NSMutableDictionary * dic = [NSMutableDictionary dictionary]; for (int i = 0 ; i< self.redUserArray.count; i++) { - RoomPKChooseUserModel * model = [self.redUserArray safeObjectAtIndex1:i]; + RoomPKChooseUserModel * model = [self.redUserArray xpSafeObjectAtIndex:i]; if (model.uid.integerValue <= 0) { continue; } @@ -332,7 +332,7 @@ } for (int i = 0 ; i< self.blueUserArray.count; i++) { - RoomPKChooseUserModel * model = [self.blueUserArray safeObjectAtIndex1:i]; + RoomPKChooseUserModel * model = [self.blueUserArray xpSafeObjectAtIndex:i]; if (model.uid.integerValue <= 0) { continue; } diff --git a/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/PIRoomPhotoAlbumItemVC.m b/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/PIRoomPhotoAlbumItemVC.m index 8c89bd6e..94fbce40 100644 --- a/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/PIRoomPhotoAlbumItemVC.m +++ b/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/PIRoomPhotoAlbumItemVC.m @@ -197,13 +197,13 @@ } PIRoomPhotoAlbumItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([PIRoomPhotoAlbumItemCell class]) forIndexPath:indexPath]; cell.roomType = self.type; - cell.albumModel = [self.photoList safeObjectAtIndex1:indexPath.row]; + cell.albumModel = [self.photoList xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ if(self.type == Photo_Album_Type_Mine)return; - PIRoomPhotoAlbumItemModel *albumModel = [self.photoList safeObjectAtIndex1:indexPath.row]; + PIRoomPhotoAlbumItemModel *albumModel = [self.photoList xpSafeObjectAtIndex:indexPath.row]; if(albumModel.type.intValue == 2 && albumModel.status == 0)return; PIRoomPhotoAlbumItemCell *cell = (PIRoomPhotoAlbumItemCell *)[self.collectionView cellForItemAtIndexPath:indexPath]; self.lookUpModel = albumModel; diff --git a/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumChooseGiftView.m b/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumChooseGiftView.m index 8d278f49..a0ddfa86 100644 --- a/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumChooseGiftView.m +++ b/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumChooseGiftView.m @@ -108,14 +108,14 @@ } PIRoomPhotoAlbumChooseGiftCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([PIRoomPhotoAlbumChooseGiftCell class]) forIndexPath:indexPath]; cell.pi_isChoose = self.chooseRow == indexPath.row; - cell.giftModel = [self.giftList safeObjectAtIndex1:indexPath.row]; + cell.giftModel = [self.giftList xpSafeObjectAtIndex:indexPath.row]; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ self.chooseRow = indexPath.row; [self.collectionView reloadData]; if(self.delegate && [self.delegate respondsToSelector:@selector(chooseGiftWithModel:)]){ - [self.delegate chooseGiftWithModel: [self.giftList safeObjectAtIndex1:indexPath.row]]; + [self.delegate chooseGiftWithModel: [self.giftList xpSafeObjectAtIndex:indexPath.row]]; } [self dissViewAction]; } diff --git a/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumChoosePhotoView.m b/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumChoosePhotoView.m index b52d374f..856baaf6 100644 --- a/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumChoosePhotoView.m +++ b/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumChoosePhotoView.m @@ -92,12 +92,12 @@ } -(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ PIRoomPhotoAlbumChoosePhotoCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([PIRoomPhotoAlbumChoosePhotoCell class]) forIndexPath:indexPath]; - cell.chooseModel = [self.choosePhotoList safeObjectAtIndex1:indexPath.row]; + cell.chooseModel = [self.choosePhotoList xpSafeObjectAtIndex:indexPath.row]; cell.delegate = self; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ - PIRoomPhotoAlbumItemChoosePhotoModel *photoModel = [self.choosePhotoList safeObjectAtIndex1:indexPath.row]; + PIRoomPhotoAlbumItemChoosePhotoModel *photoModel = [self.choosePhotoList xpSafeObjectAtIndex:indexPath.row]; if(photoModel.isDefault == YES && self.delegate && [self.delegate respondsToSelector:@selector(clickChoosePictures)]){ [self.delegate clickChoosePictures]; return; @@ -115,7 +115,7 @@ - (UIImage *)photoBrowser:(SDPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index { - UIImage *image = [self.picList safeObjectAtIndex1:index]; + UIImage *image = [self.picList xpSafeObjectAtIndex:index]; return image != nil ? image : [UIImageConstant defalutBannerPlaceholder]; } -(void)clickUploadPicturesAction{ diff --git a/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumOperateView.m b/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumOperateView.m index 643c984a..34276413 100644 --- a/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumOperateView.m +++ b/YuMi/Modules/YMRoom/View/RoomPhotoAlbum/View/SubViews/PIRoomPhotoAlbumOperateView.m @@ -40,7 +40,7 @@ } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ PIRoomPhotoAlbumOperateCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([PIRoomPhotoAlbumOperateCell class]) forIndexPath:indexPath]; - cell.title = [self.titleList safeObjectAtIndex1:indexPath.row]; + cell.title = [self.titleList xpSafeObjectAtIndex:indexPath.row]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ diff --git a/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingPrizeView.m b/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingPrizeView.m index 8ff3ef37..b6558dbc 100644 --- a/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingPrizeView.m +++ b/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingPrizeView.m @@ -61,7 +61,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPSailingPrizeCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPSailingPrizeCollectionViewCell class]) forIndexPath:indexPath]; - cell.prizeModel = [self.prizeInfo.prizeItemList safeObjectAtIndex1:indexPath.row]; + cell.prizeModel = [self.prizeInfo.prizeItemList xpSafeObjectAtIndex:indexPath.row]; return cell; } #pragma mark - Getters And Setters diff --git a/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingRankSubView.m b/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingRankSubView.m index cce02e99..b4d2750d 100644 --- a/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingRankSubView.m +++ b/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingRankSubView.m @@ -128,7 +128,7 @@ if (cell == nil) { cell = [[XPSailingRankTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPSailingRankTableViewCell class])]; } - cell.rankInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.rankInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; return cell; } XPSailingEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPSailingEmptyTableViewCell class])]; diff --git a/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingViewController.m b/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingViewController.m index 403e673c..79514ea6 100644 --- a/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingViewController.m +++ b/YuMi/Modules/YMRoom/View/Sailing/View/XPSailingViewController.m @@ -332,7 +332,7 @@ NSString * const kSailingPrizeAlertKey = @"kSailingPrizeAlertKey"; [self.animationView.subviews.firstObject removeFromSuperview]; } for (int i=0; i < self.animationView.subviews.count; i++) { - XPSailingGiftView * view = [self.animationView.subviews safeObjectAtIndex1:i]; + XPSailingGiftView * view = [self.animationView.subviews xpSafeObjectAtIndex:i]; NSInteger offsetY= (self.animationView.subviews.count - i) * KitemHeight; [UIView animateWithDuration:0.1 animations:^{ CGRect rect = view.frame; @@ -481,7 +481,7 @@ NSString * const kSailingPrizeAlertKey = @"kSailingPrizeAlertKey"; } else { self.addButton.enabled = YES; } - NSString * count = [self.levelArray safeObjectAtIndex1:_exploreCount]; + NSString * count = [self.levelArray xpSafeObjectAtIndex:_exploreCount]; self.textField.text = count; self.consumLabel.text = [NSString stringWithFormat:YMLocalizedString(@"XPSailingViewController0"), count]; } diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftStorage.m b/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftStorage.m index 61f4d12b..d00c0018 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftStorage.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftStorage.m @@ -97,7 +97,7 @@ [fileManager createDirectoryAtPath:giftDirPath withIntermediateDirectories:YES attributes:nil error:nil]; } for (int i = 0; i< array.count; i++) { - GiftInfoModel * giftInfoModel = [array safeObjectAtIndex1:i]; + GiftInfoModel * giftInfoModel = [array xpSafeObjectAtIndex:i]; NSString *giftPath = [giftDirPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%ld", giftInfoModel.giftId]]; [NSKeyedArchiver archiveRootObject:giftInfoModel.model2dictionary toFile:giftPath]; } diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/Cell/XPGiftWeekStarCollectionViewCell.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/Cell/XPGiftWeekStarCollectionViewCell.m index 9f661f86..39899f1e 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/Cell/XPGiftWeekStarCollectionViewCell.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/Cell/XPGiftWeekStarCollectionViewCell.m @@ -72,7 +72,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPGiftItemCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPGiftItemCollectionViewCell class]) forIndexPath:indexPath]; GiftInfoModel * giftInfo; - giftInfo= [self.weekStarGiftList safeObjectAtIndex1:indexPath.item]; + giftInfo= [self.weekStarGiftList xpSafeObjectAtIndex:indexPath.item]; if (giftInfo.giftId == self.selectGiftInfo.giftId) { giftInfo.isSelected = YES; } else { @@ -86,7 +86,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; if (self.weekStarGiftList.count > 0) { - GiftInfoModel * giftInfo= [self.weekStarGiftList safeObjectAtIndex1:indexPath.item]; + GiftInfoModel * giftInfo= [self.weekStarGiftList xpSafeObjectAtIndex:indexPath.item]; self.selectGiftInfo = giftInfo; [self.collectionView reloadData]; diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftInfoSegmentedView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftInfoSegmentedView.m index 57c2a10f..d32eb404 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftInfoSegmentedView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftInfoSegmentedView.m @@ -108,7 +108,7 @@ vc.curUserNobleLevel = self.curUserNobleLevel; } vc.usingplaceType = self.usingplaceType; - vc.normalOriginArray = [self.giftList safeObjectAtIndex1:index]; + vc.normalOriginArray = [self.giftList xpSafeObjectAtIndex:index]; return vc; } - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index{ @@ -141,12 +141,12 @@ -(XPGiftInfoView *)getListVC:(NSInteger)index{ if(self.usingplaceType == SendGiftType_User){ - return [@[self.normalVC,self.weekStarVC,self.nobleVC] safeObjectAtIndex1:index]; + return [@[self.normalVC,self.weekStarVC,self.nobleVC] xpSafeObjectAtIndex:index]; } if(self.roomType == RoomType_Anchor){ - return [@[self.normalVC,self.luckyVC,self.weekStarVC,self.nobleVC,self.anchorVC] safeObjectAtIndex1:index]; + return [@[self.normalVC,self.luckyVC,self.weekStarVC,self.nobleVC,self.anchorVC] xpSafeObjectAtIndex:index]; } - return [@[self.normalVC,self.luckyVC,self.weekStarVC,self.nobleVC] safeObjectAtIndex1:index]; + return [@[self.normalVC,self.luckyVC,self.weekStarVC,self.nobleVC] xpSafeObjectAtIndex:index]; } -(NSInteger)getIndex{ if(self.usingplaceType == SendGiftType_User){ @@ -159,10 +159,10 @@ } } if(self.roomType == RoomType_Anchor){ - NSString *index = [@[@"0",@"1",@"2",@"3",@"4"] safeObjectAtIndex1:self.segmentType]; + NSString *index = [@[@"0",@"1",@"2",@"3",@"4"] xpSafeObjectAtIndex:self.segmentType]; return index.integerValue; } - NSString *index = [@[@"0",@"1",@"2",@"3"] safeObjectAtIndex1:self.segmentType]; + NSString *index = [@[@"0",@"1",@"2",@"3"] xpSafeObjectAtIndex:self.segmentType]; return index.integerValue; } -(void)didClickGiftSegmentAction:(UIButton *)sender{ diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftCountView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftCountView.m index 27b0db97..b551ee87 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftCountView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftCountView.m @@ -115,7 +115,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPGiftCountCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPGiftCountCollectionViewCell class]) forIndexPath:indexPath]; - XPGiftCountModel *countItem = [self.giftCountArray safeObjectAtIndex1:indexPath.item]; + XPGiftCountModel *countItem = [self.giftCountArray xpSafeObjectAtIndex:indexPath.item]; cell.countModel = countItem; return cell; } @@ -123,7 +123,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPGiftCountView:didClickItem:)]) { - XPGiftCountModel *countItem = [self.giftCountArray safeObjectAtIndex1:indexPath.item]; + XPGiftCountModel *countItem = [self.giftCountArray xpSafeObjectAtIndex:indexPath.item]; [self.delegate xPGiftCountView:self didClickItem:countItem]; } } @@ -137,7 +137,7 @@ } if (self.delegate && [self.delegate respondsToSelector:@selector(xPGiftCountView:didClickItem:)]) { - XPGiftCountModel *countItem = [self.giftCountArray safeObjectAtIndex1:0]; + XPGiftCountModel *countItem = [self.giftCountArray xpSafeObjectAtIndex:0]; [self.delegate xPGiftCountView:self didClickItem:countItem]; } diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftHeadTypeView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftHeadTypeView.m index 794d94ae..d55712ae 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftHeadTypeView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftHeadTypeView.m @@ -106,7 +106,7 @@ static NSString *kHideGiftViewInteractDot = @"kHideGiftViewInteractDot";//是否 #pragma mark - SDCycleScrollViewDelegate - (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { if (self.titleArray.count > index) { - NSString *str = [self.titleArray safeObjectAtIndex1:index]; + NSString *str = [self.titleArray xpSafeObjectAtIndex:index]; if([str isEqualToString:YMLocalizedString(@"XPGiftHeadTypeView0")]) { if (self.delegate && [self.delegate respondsToSelector:@selector(xPGiftHeadTypeViewDidClickFirstRecharge:)]) { [self.delegate xPGiftHeadTypeViewDidClickFirstRecharge:self]; diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.m index c31377af..90c908c5 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.m @@ -91,7 +91,7 @@ if(self.segmentType == GiftSegmentType_Pack && self.datasource.count > 0){ NSInteger index = self.pageController.currentPage * 8 + 1; if(self.datasource.count >= index){ - GiftInfoModel * gift = [self.datasource safeObjectAtIndex1:index - 1]; + GiftInfoModel * gift = [self.datasource xpSafeObjectAtIndex:index - 1]; [self dealSelectGift:gift]; }else{ NSInteger page = 0; @@ -131,7 +131,7 @@ // 根据礼物id查找 - (GiftInfoModel *)findGiftInfoByGiftId:(NSInteger)giftId { for (int i=0; i 0) { - GiftInfoModel * giftInfo= [self.datasource safeObjectAtIndex1:indexPath.item]; + GiftInfoModel * giftInfo= [self.datasource xpSafeObjectAtIndex:indexPath.item]; [self dealSelectGift:giftInfo]; [self.giftcollectionView reloadData]; if (self.delegate && [self.delegate respondsToSelector:@selector(xPGiftInfoView:didClickItem:type:)]) { diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftLuckyGiftBroadcastView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftLuckyGiftBroadcastView.m index f381d3ed..7ca25963 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftLuckyGiftBroadcastView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftLuckyGiftBroadcastView.m @@ -146,7 +146,7 @@ - (void)setupCustomCell:(UICollectionViewCell *)cell forIndex:(NSInteger)index cycleScrollView:(SDCycleScrollView *)view { XPGiftLuckyGiftBroadcastCell *myCell = (XPGiftLuckyGiftBroadcastCell *)cell; - GiftLuckyBroadcastModel * info = [self.records safeObjectAtIndex1:index]; + GiftLuckyBroadcastModel * info = [self.records xpSafeObjectAtIndex:index]; myCell.giftInfo = info; } diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftTwelveStarBroadcastView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftTwelveStarBroadcastView.m index ab4f6b84..3e720071 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftTwelveStarBroadcastView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftTwelveStarBroadcastView.m @@ -97,7 +97,7 @@ - (void)setupCustomCell:(UICollectionViewCell *)cell forIndex:(NSInteger)index cycleScrollView:(SDCycleScrollView *)view { XPGiftTwelveStarBroadcastCell *myCell = (XPGiftTwelveStarBroadcastCell *)cell; - XPWeekStarRankUserModel * info = [self.records safeObjectAtIndex1:index]; + XPWeekStarRankUserModel * info = [self.records xpSafeObjectAtIndex:index]; [myCell.skipBtn addTarget:self action:@selector(skipBtnAction:) forControlEvents:UIControlEventTouchUpInside]; myCell.userModel = info; diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftUsersView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftUsersView.m index 5f8237bc..7f304a54 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftUsersView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftUsersView.m @@ -128,7 +128,7 @@ }]; for (int i = 0; i < newArray.count; i++) { - XPGiftUserInfoModel * userInfo = [newArray safeObjectAtIndex1:i]; + XPGiftUserInfoModel * userInfo = [newArray xpSafeObjectAtIndex:i]; if (userInfo && userInfo.uid > 0 && userInfo.uid != uid.integerValue) { ///自己在麦上不显示在送礼物列表中 NSString * uid = [NSString stringWithFormat:@"%ld", userInfo.uid]; if (userInfo.isSelect) { @@ -170,14 +170,14 @@ -(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPGiftUserCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPGiftUserCollectionViewCell class]) forIndexPath:indexPath]; - XPGiftUserInfoModel * queue = [self.userArray safeObjectAtIndex1:indexPath.row]; + XPGiftUserInfoModel * queue = [self.userArray xpSafeObjectAtIndex:indexPath.row]; cell.userInfo = queue; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; - XPGiftUserInfoModel * queue = [self.userArray safeObjectAtIndex1:indexPath.row]; + XPGiftUserInfoModel * queue = [self.userArray xpSafeObjectAtIndex:indexPath.row]; queue.isSelect = !queue.isSelect; [self.collectionView reloadData]; NSString * selectUid = [NSString stringWithFormat:@"%ld", queue.uid]; diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPSendGiftView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPSendGiftView.m index fa3eda83..c69659a6 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPSendGiftView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPSendGiftView.m @@ -206,7 +206,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView; AttachmentModel * attachment = [[AttachmentModel alloc] init]; attachment.first = CustomMessageType_AllMicroSend; attachment.second = Custom_Message_Sub_AllMicroLuckySend; - NSDictionary * obj = [luckyBagGifts safeObjectAtIndex1:i]; + NSDictionary * obj = [luckyBagGifts xpSafeObjectAtIndex:i]; // NSArray *giftList = (NSArray *)obj[@"giftList"]; // for (NSDictionary *giftDic in giftList) { // for (NSDictionary *displayDic in displayGift) { diff --git a/YuMi/Modules/YMRoom/View/SendRedPacket/Cell/PIRedPacketChooseTypeView.m b/YuMi/Modules/YMRoom/View/SendRedPacket/Cell/PIRedPacketChooseTypeView.m index d8dfad0e..3c8ab2c8 100644 --- a/YuMi/Modules/YMRoom/View/SendRedPacket/Cell/PIRedPacketChooseTypeView.m +++ b/YuMi/Modules/YMRoom/View/SendRedPacket/Cell/PIRedPacketChooseTypeView.m @@ -48,8 +48,8 @@ -(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ PIRedPacketChooseTypeCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([PIRedPacketChooseTypeCell class]) forIndexPath:indexPath]; cell.isChoose = self.chooseRow == indexPath.row; - cell.pi_title = [self.titleList safeObjectAtIndex1:indexPath.row]; - cell.pi_subTitle = [self.subTitleList safeObjectAtIndex1:indexPath.row]; + cell.pi_title = [self.titleList xpSafeObjectAtIndex:indexPath.row]; + cell.pi_subTitle = [self.subTitleList xpSafeObjectAtIndex:indexPath.row]; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ diff --git a/YuMi/Modules/YMRoom/View/SendRedPacket/PIReceiveRedPacketSuccessView.m b/YuMi/Modules/YMRoom/View/SendRedPacket/PIReceiveRedPacketSuccessView.m index 08a26fc6..ef4db6d8 100644 --- a/YuMi/Modules/YMRoom/View/SendRedPacket/PIReceiveRedPacketSuccessView.m +++ b/YuMi/Modules/YMRoom/View/SendRedPacket/PIReceiveRedPacketSuccessView.m @@ -114,7 +114,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ XPOpenRedPacketCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPOpenRedPacketCell class]) forIndexPath:indexPath]; - XPRedPacketPersonReceiveModel *model = [self.resultModel.redEnvelopeItemVOs safeObjectAtIndex1:indexPath.row]; + XPRedPacketPersonReceiveModel *model = [self.resultModel.redEnvelopeItemVOs xpSafeObjectAtIndex:indexPath.row]; cell.model = model; return cell; } diff --git a/YuMi/Modules/YMRoom/View/SendRedPacket/PIRoomSendRedPacketItemVC.m b/YuMi/Modules/YMRoom/View/SendRedPacket/PIRoomSendRedPacketItemVC.m index 3c202bdf..4c3120b3 100644 --- a/YuMi/Modules/YMRoom/View/SendRedPacket/PIRoomSendRedPacketItemVC.m +++ b/YuMi/Modules/YMRoom/View/SendRedPacket/PIRoomSendRedPacketItemVC.m @@ -284,7 +284,7 @@ NSString *roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid]; NSString *type = self.type == Room_Send_Red_Packet_Type_Lobby ? @"1" : @"2"; NSArray *kindList = @[@"1",@"2",@"3",@"4"]; - NSString *kind = self.type == Room_Send_Red_Packet_Type_Lobby ? [kindList safeObjectAtIndex1:self.sendRedType] : @"0"; + NSString *kind = self.type == Room_Send_Red_Packet_Type_Lobby ? [kindList xpSafeObjectAtIndex:self.sendRedType] : @"0"; NSString *message ; if(self.type == Room_Send_Red_Packet_Type_Lobby){ message = self.scrollingView.pi_scrolling.length > 0 ? self.scrollingView.pi_scrolling : YMLocalizedString(@"XPRoomSendRedPacketViewController4"); diff --git a/YuMi/Modules/YMRoom/View/Setting/Presenter/XPRoomSettingPresenter.m b/YuMi/Modules/YMRoom/View/Setting/Presenter/XPRoomSettingPresenter.m index 295454b4..8f7a3c53 100644 --- a/YuMi/Modules/YMRoom/View/Setting/Presenter/XPRoomSettingPresenter.m +++ b/YuMi/Modules/YMRoom/View/Setting/Presenter/XPRoomSettingPresenter.m @@ -223,13 +223,13 @@ } NSMutableArray *list = [[NSMutableArray alloc]initWithArray:array]; if(member.type == NIMChatroomMemberTypeManager || member.type == NIMChatroomMemberTypeCreator || isSuperAdmin){ - NSMutableArray *subList = [[NSMutableArray alloc]initWithArray:[list safeObjectAtIndex1:2]?:@[]]; + NSMutableArray *subList = [[NSMutableArray alloc]initWithArray:[list xpSafeObjectAtIndex:2]?:@[]]; if(subList){ [subList addObject:giftValueItem]; } list[2] = subList; - NSMutableArray *themeList = [[NSMutableArray alloc]initWithArray:[list safeObjectAtIndex1:1]?:@[]]; + NSMutableArray *themeList = [[NSMutableArray alloc]initWithArray:[list xpSafeObjectAtIndex:1]?:@[]]; if(themeList){ [themeList addObject:themeItem]; } diff --git a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomInviteUserViewController.m b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomInviteUserViewController.m index 9eefad0f..6152dc11 100644 --- a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomInviteUserViewController.m +++ b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomInviteUserViewController.m @@ -99,7 +99,7 @@ NSArray * tmpList = x; [self.datasource addObjectsFromArray:tmpList]; for (NSInteger i = (self.datasource.count - 1); i >= 0; i--) { - NIMChatroomMember * member = [self.datasource safeObjectAtIndex1:i]; + NIMChatroomMember * member = [self.datasource xpSafeObjectAtIndex:i]; for (UserInfoModel * userInfo in queueArray) { if (member.userId.integerValue == userInfo.uid) { [self.datasource removeObject:member]; @@ -135,7 +135,7 @@ }]; for (NSInteger i = (self.datasource.count - 1); i >= 0; i--) { - NIMChatroomMember * member = [self.datasource safeObjectAtIndex1:i]; + NIMChatroomMember * member = [self.datasource xpSafeObjectAtIndex:i]; for (UserInfoModel * userInfo in self.micQueueArray) { if (member.userId.integerValue == userInfo.uid) { [self.datasource removeObject:member]; @@ -274,7 +274,7 @@ if (cell == nil) { cell = [[XPRoomOnlineTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomOnlineTableViewCell class])]; } - NIMChatroomMember * member = [self.datasource safeObjectAtIndex1:indexPath.row]; + NIMChatroomMember * member = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.member = member; cell.onlineType = RoomOnLineType_Invite_User; return cell; @@ -299,7 +299,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - NIMChatroomMember * member = [self.datasource safeObjectAtIndex1:indexPath.row]; + NIMChatroomMember * member = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if ([AccountInfoStorage instance].getUid.integerValue == member.userId.integerValue) { [Api getUserInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { if (code == 200) { diff --git a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomOnLineViewController.m b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomOnLineViewController.m index 6a5c828b..8ee6b122 100644 --- a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomOnLineViewController.m +++ b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomOnLineViewController.m @@ -179,7 +179,7 @@ if (cell == nil) { cell = [[XPRoomOnlineTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomOnlineTableViewCell class])]; } - XPMessageRemoteExtModel * member = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMessageRemoteExtModel * member = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.userInfo = member; return cell; } @@ -203,7 +203,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - XPMessageRemoteExtModel * userInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + XPMessageRemoteExtModel * userInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (userInfo.userVipInfoVO.enterHide) { return; } diff --git a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomRoleViewController.m b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomRoleViewController.m index dd7fbc3e..1a732cb0 100644 --- a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomRoleViewController.m +++ b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomRoleViewController.m @@ -78,7 +78,7 @@ - (BOOL)isRoomSuperAdmin:(NSString *)uid { BOOL isSuperAdmin = NO; for (int i = 0; i< self.superAdmminList.count; i++) { - GuildSuperAdminInfoModel * superAdminInfo = [self.superAdmminList safeObjectAtIndex1:i]; + GuildSuperAdminInfoModel * superAdminInfo = [self.superAdmminList xpSafeObjectAtIndex:i]; if ([superAdminInfo.uid isEqualToString:uid]) { isSuperAdmin = YES; break; @@ -99,7 +99,7 @@ cell = [[XPRoomRoleTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomRoleTableViewCell class])]; } cell.delegate = self; - cell.member = [self.datasource safeObjectAtIndex1:indexPath.row]; + cell.member = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (indexPath.row == (self.datasource.count -1)) { cell.lineView.hidden = YES; } else { diff --git a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m index 741f4df7..4c503459 100644 --- a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m +++ b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m @@ -177,12 +177,12 @@ cell = [[XPRoomSettingTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomSettingTableViewCell class])]; } cell.delegate = self; - cell.itemModel = [[self.datasource safeObjectAtIndex1:indexPath.section] safeObjectAtIndex1:indexPath.row]; + cell.itemModel = [[self.datasource xpSafeObjectAtIndex:indexPath.section] xpSafeObjectAtIndex:indexPath.row]; return cell; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { -XPRoomSettingItemModel * itemModel = [[self.datasource safeObjectAtIndex1:indexPath.section] safeObjectAtIndex1:indexPath.row]; +XPRoomSettingItemModel * itemModel = [[self.datasource xpSafeObjectAtIndex:indexPath.section] xpSafeObjectAtIndex:indexPath.row]; if (itemModel.type == RoomSettingItemType_Leave_Model && itemModel.switchState) { return 60; } @@ -201,7 +201,7 @@ XPRoomSettingItemModel * itemModel = [[self.datasource safeObjectAtIndex1:indexP - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; - XPRoomSettingItemModel * itemModel = [[self.datasource safeObjectAtIndex1:indexPath.section] safeObjectAtIndex1:indexPath.row]; + XPRoomSettingItemModel * itemModel = [[self.datasource xpSafeObjectAtIndex:indexPath.section] xpSafeObjectAtIndex:indexPath.row]; NSString * roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid]; NSString * roomId = [NSString stringWithFormat:@"%ld", self.roomInfo.roomId]; NSString * roomTag = [NSString stringWithFormat:@"%ld", self.roomInfo.tagId]; diff --git a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomTagListView.m b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomTagListView.m index 3ade46aa..6d118f48 100644 --- a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomTagListView.m +++ b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomTagListView.m @@ -125,7 +125,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPRoomSettingTagCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPRoomSettingTagCell class]) forIndexPath:indexPath]; if (self.tagType == RoomSettingSelectTagTypeTag) { - RoomTagModel *homeTag = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomTagModel *homeTag = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (self.selectTagInfo) { if (homeTag.tid.intValue == self.selectTagInfo.tid.intValue) { homeTag.isSelect = YES; @@ -141,7 +141,7 @@ } cell.roomTag = homeTag; } else { - RoomClassifyModel *homeTag = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomClassifyModel *homeTag = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (self.selectClassifyInfo) { if (homeTag.cid.intValue == self.selectClassifyInfo.cid.intValue) { homeTag.isSelect = YES; @@ -166,11 +166,11 @@ - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { if (self.tagType == RoomSettingSelectTagTypeTag) { - RoomTagModel *homeTag = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomTagModel *homeTag = [self.datasource xpSafeObjectAtIndex:indexPath.row]; CGFloat width = [homeTag.name boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:12]} context:nil].size.width; return CGSizeMake(width + 26, 26); } else { - RoomClassifyModel *homeTag = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomClassifyModel *homeTag = [self.datasource xpSafeObjectAtIndex:indexPath.row]; CGFloat width = [homeTag.sortName boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:12]} context:nil].size.width; return CGSizeMake(width + 26, 26); } @@ -180,10 +180,10 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; if (self.tagType == RoomSettingSelectTagTypeTag) { - RoomTagModel * roomTag = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomTagModel * roomTag = [self.datasource xpSafeObjectAtIndex:indexPath.row]; self.selectTagInfo = roomTag; } else { - RoomClassifyModel *roomClassify = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomClassifyModel *roomClassify = [self.datasource xpSafeObjectAtIndex:indexPath.row]; self.selectClassifyInfo = roomClassify; } [collectionView reloadData]; diff --git a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomTagListViewController.m b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomTagListViewController.m index dd734982..11453f88 100644 --- a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomTagListViewController.m +++ b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomTagListViewController.m @@ -116,7 +116,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPRoomSettingTagCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPRoomSettingTagCell class]) forIndexPath:indexPath]; if (self.tagType == RoomSettingTagTypeTag) { - RoomTagModel *homeTag = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomTagModel *homeTag = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (self.selectTagInfo) { if (homeTag.tid.intValue == self.selectTagInfo.tid.intValue) { homeTag.isSelect = YES; @@ -132,7 +132,7 @@ } cell.roomTag = homeTag; } else { - RoomClassifyModel *homeTag = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomClassifyModel *homeTag = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (self.selectClassifyInfo) { if (homeTag.cid.intValue == self.selectClassifyInfo.cid.intValue) { homeTag.isSelect = YES; @@ -157,11 +157,11 @@ - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { if (self.tagType == RoomSettingTagTypeTag) { - RoomTagModel *homeTag = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomTagModel *homeTag = [self.datasource xpSafeObjectAtIndex:indexPath.row]; CGFloat width = [homeTag.name boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:12]} context:nil].size.width; return CGSizeMake(width + 26, 26); } else { - RoomClassifyModel *homeTag = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomClassifyModel *homeTag = [self.datasource xpSafeObjectAtIndex:indexPath.row]; CGFloat width = [homeTag.sortName boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:12]} context:nil].size.width; return CGSizeMake(width + 26, 26); } @@ -171,10 +171,10 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [collectionView deselectItemAtIndexPath:indexPath animated:YES]; if (self.tagType == RoomSettingTagTypeTag) { - RoomTagModel * roomTag = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomTagModel * roomTag = [self.datasource xpSafeObjectAtIndex:indexPath.row]; self.selectTagInfo = roomTag; } else { - RoomClassifyModel *roomClassify = [self.datasource safeObjectAtIndex1:indexPath.row]; + RoomClassifyModel *roomClassify = [self.datasource xpSafeObjectAtIndex:indexPath.row]; self.selectClassifyInfo = roomClassify; } [collectionView reloadData]; diff --git a/YuMi/Modules/YMRoom/View/StageView/StageView.m b/YuMi/Modules/YMRoom/View/StageView/StageView.m index 5a3fadd7..a154cad5 100644 --- a/YuMi/Modules/YMRoom/View/StageView/StageView.m +++ b/YuMi/Modules/YMRoom/View/StageView/StageView.m @@ -323,7 +323,7 @@ - (void)giftValueUpdate:(NSDictionary *)dic { GiftValueInfoModel * model = [GiftValueInfoModel modelWithDictionary:dic]; for (int i = 0; i < model.giftValueVos.count; i++) { - GiftValueDetailModel * giftValueModel = [model.giftValueVos safeObjectAtIndex1:i]; + GiftValueDetailModel * giftValueModel = [model.giftValueVos xpSafeObjectAtIndex:i]; UIView * view = [self findMicroViewByUid:giftValueModel.uid]; if (self.hostDelegate.getRoomInfo.leaveMode && giftValueModel.uid.integerValue == self.hostDelegate.getRoomInfo.uid) { view = [self findMicroViewByIndex:0]; @@ -735,7 +735,7 @@ if ([faceDic[@"data"] isKindOfClass:[NSArray class]]) { NSArray *arr = faceDic[@"data"]; for (int i = 0; i < arr.count; i++) { - NSDictionary *dict = [arr safeObjectAtIndex1:i]; + NSDictionary *dict = [arr xpSafeObjectAtIndex:i]; RoomFaceSendInfoModel * receiveInfo = [RoomFaceSendInfoModel modelWithDictionary:dict]; UIView * view = [self findMicroViewByUid:[NSString stringWithFormat:@"%ld",receiveInfo.uid]]; if (view == nil) continue; @@ -972,7 +972,7 @@ - (UIView *)findMicroViewByIndex:(NSInteger)index { if (self.microViews && self.microViews.count > index) { - return [self.microViews safeObjectAtIndex1:index]; + return [self.microViews xpSafeObjectAtIndex:index]; } return nil; } diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/Cell/XPTreasureFairyTrialsRecordCell.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/Cell/XPTreasureFairyTrialsRecordCell.m index dee04132..95100983 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/Cell/XPTreasureFairyTrialsRecordCell.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/Cell/XPTreasureFairyTrialsRecordCell.m @@ -91,7 +91,7 @@ } NSMutableString * trilasTitle = [[NSMutableString alloc] init]; for (int i = 0; i < _recordInfo.expendList.count; i++) { - TreasureFairyBallModel * ballInfo = [_recordInfo.expendList safeObjectAtIndex1:i]; + TreasureFairyBallModel * ballInfo = [_recordInfo.expendList xpSafeObjectAtIndex:i]; if (ballInfo.elfName.length > 0) { [trilasTitle appendString:[NSString stringWithFormat:@"%@x%ld", ballInfo.elfName, ballInfo.elfNum]]; } diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFailyResultView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFailyResultView.m index e887effe..a52f2588 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFailyResultView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFailyResultView.m @@ -87,7 +87,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPTreasureFailyResultGiftCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPTreasureFailyResultGiftCell class]) forIndexPath:indexPath]; - TreasureFairyInfoModel * info = [self.datasource safeObjectAtIndex1:indexPath.row]; + TreasureFairyInfoModel * info = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.prizeInfo = info; return cell; } diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyBallContentView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyBallContentView.m index 871babbf..fe6c45b8 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyBallContentView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyBallContentView.m @@ -92,9 +92,9 @@ _datasource = datasource; if (_datasource.count > 0) { for (int i = 0; i < _datasource.count; i++) { - TreasureFairyBallModel * ballInfo = [_datasource safeObjectAtIndex1:i]; + TreasureFairyBallModel * ballInfo = [_datasource xpSafeObjectAtIndex:i]; if (i < self.viewList.count) { - XPTreasureFairyBallView * view = [self.viewList safeObjectAtIndex1:i]; + XPTreasureFairyBallView * view = [self.viewList xpSafeObjectAtIndex:i]; view.ballInfo = ballInfo; } } diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyDrawView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyDrawView.m index 0cc04781..4ab85c0d 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyDrawView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyDrawView.m @@ -97,7 +97,7 @@ } - (void)stopAnimation { - XPTreasureFairyDrawSubView * view = [self.viewList safeObjectAtIndex1:self.rewardNumber]; + XPTreasureFairyDrawSubView * view = [self.viewList xpSafeObjectAtIndex:self.rewardNumber]; if (view) { [self.coverImageView mas_remakeConstraints:^(MASConstraintMaker *make) { make.size.mas_equalTo(CGSizeMake(75 * kScreenScale, 81 * kScreenScale)); @@ -120,7 +120,7 @@ ///拿到需要停止的奖品的位置 if (self.cycleCount == (12 * 2 + self.rewardIndex)) { [self stopTimer]; - XPTreasureFairyDrawSubView * view = [self.viewList safeObjectAtIndex1:self.rewardNumber]; + XPTreasureFairyDrawSubView * view = [self.viewList xpSafeObjectAtIndex:self.rewardNumber]; if (view) { [self.coverImageView mas_remakeConstraints:^(MASConstraintMaker *make) { make.size.mas_equalTo(CGSizeMake(75 * kScreenScale, 81 * kScreenScale)); @@ -133,7 +133,7 @@ if (self.currentIndex >= self.viewList.count) { self.currentIndex = 0; } - XPTreasureFairyDrawSubView * view = [self.viewList safeObjectAtIndex1:self.currentIndex]; + XPTreasureFairyDrawSubView * view = [self.viewList xpSafeObjectAtIndex:self.currentIndex]; if (view) { [self.coverImageView mas_remakeConstraints:^(MASConstraintMaker *make) { make.size.mas_equalTo(CGSizeMake(75 * kScreenScale, 81 * kScreenScale)); @@ -321,9 +321,9 @@ _failyList = failyList; if (_failyList.count > 0) { for (int i = 0; i < _failyList.count; i++) { - TreasureFairyInfoModel * info = [_failyList safeObjectAtIndex1:i]; + TreasureFairyInfoModel * info = [_failyList xpSafeObjectAtIndex:i]; if (i < self.viewList.count) { - XPTreasureFairyDrawSubView * view = [self.viewList safeObjectAtIndex1:i]; + XPTreasureFairyDrawSubView * view = [self.viewList xpSafeObjectAtIndex:i]; view.info = info; } } @@ -335,7 +335,7 @@ if (_rewardInfo) { for (int i = 0; i < self.failyList.count; i++) { - TreasureFairyInfoModel * info = [_failyList safeObjectAtIndex1:i]; + TreasureFairyInfoModel * info = [_failyList xpSafeObjectAtIndex:i]; if (info.itemIndex == _rewardInfo.itemIndex) { self.rewardNumber = i; diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyFriendView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyFriendView.m index 9334a9af..eb45e48e 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyFriendView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyFriendView.m @@ -148,7 +148,7 @@ if (cell == nil) { cell = [[XPTreasureFairyFriendCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPTreasureFairyFriendCell class])]; } - UserInfoModel * info = [self.friendList safeObjectAtIndex1:indexPath.row]; + UserInfoModel * info = [self.friendList xpSafeObjectAtIndex:indexPath.row]; cell.userInfo = info; return cell; } @@ -157,7 +157,7 @@ [tableView deselectRowAtIndexPath:indexPath animated:YES]; [self.searchTextField resignFirstResponder]; if (self.friendList.count> 0) { - UserInfoModel * info = [self.friendList safeObjectAtIndex1:indexPath.row]; + UserInfoModel * info = [self.friendList xpSafeObjectAtIndex:indexPath.row]; XPTreasureFairySendView * sendView = [[XPTreasureFairySendView alloc] init]; self.ballInfo.nick = info.nick; self.ballInfo.uid = info.uid; diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyNewSummonView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyNewSummonView.m index 55623f9c..a6cc35a0 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyNewSummonView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyNewSummonView.m @@ -138,9 +138,9 @@ if (code == 200) { TreasureFairyBallInfoModel * info = [TreasureFairyBallInfoModel modelWithDictionary:data.data]; - TreasureFairyBallModel *firstModel = [info.highElves safeObjectAtIndex1:0]; - TreasureFairyBallModel *secondModel = [info.highElves safeObjectAtIndex1:1]; - TreasureFairyBallModel *thirdModel = [info.highElves safeObjectAtIndex1:2]; + TreasureFairyBallModel *firstModel = [info.highElves xpSafeObjectAtIndex:0]; + TreasureFairyBallModel *secondModel = [info.highElves xpSafeObjectAtIndex:1]; + TreasureFairyBallModel *thirdModel = [info.highElves xpSafeObjectAtIndex:2]; if(firstModel != nil){ self.firstNumView.hidden = NO; diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyPrizeRecordView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyPrizeRecordView.m index a24934d3..434e0225 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyPrizeRecordView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyPrizeRecordView.m @@ -126,7 +126,7 @@ if (cell == nil) { cell = [[XPTreasureFairyPrizeRecordCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPTreasureFairyPrizeRecordCell class])]; } - TreasureFairyInfoModel * info = [self.datasource safeObjectAtIndex1:indexPath.row]; + TreasureFairyInfoModel * info = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.recordInfo = info; return cell; } diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyPrizeSubView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyPrizeSubView.m index c644f9cf..888ee6b1 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyPrizeSubView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyPrizeSubView.m @@ -57,7 +57,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPTreasureFairyPrizePoolCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPTreasureFairyPrizePoolCell class]) forIndexPath:indexPath]; - TreasureFairyInfoModel * info = [self.datasource safeObjectAtIndex1:indexPath.row]; + TreasureFairyInfoModel * info = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.info = info; return cell; } diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairySendRecordView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairySendRecordView.m index b8313de0..054e99cc 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairySendRecordView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairySendRecordView.m @@ -146,7 +146,7 @@ if (cell == nil) { cell = [[XPTreasureFairySendRecordCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPTreasureFairySendRecordCell class])]; } - TreasureFairySendRecordModel * record = [self.datasource safeObjectAtIndex1:indexPath.row]; + TreasureFairySendRecordModel * record = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.recordInfo = record; return cell; } diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyShopingRecordSubView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyShopingRecordSubView.m index 24a961ca..726a70dc 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyShopingRecordSubView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyShopingRecordSubView.m @@ -122,7 +122,7 @@ if (cell == nil) { cell = [[XPTreasureFairyShopingRecordCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPTreasureFairyShopingRecordCell class])]; } - TreasureFairyConvertRecordModel *recordModel = [self.datasource safeObjectAtIndex1:indexPath.row]; + TreasureFairyConvertRecordModel *recordModel = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.isSummon = self.isSummond; cell.recordModel = recordModel; return cell; diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreResultSmallView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreResultSmallView.m index 4932817b..b65e5c5c 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreResultSmallView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreResultSmallView.m @@ -100,11 +100,11 @@ _datasource = datasource; if(_datasource) { if (self.isTrialsResult) { - TreasureFairyBallModel * info = [_datasource safeObjectAtIndex1:0]; + TreasureFairyBallModel * info = [_datasource xpSafeObjectAtIndex:0]; self.titleLabel.text = YMLocalizedString(@"XPTreasureFairyStoreResultSmallView0"); self.oneGiftView.ballInfo = info; } else { - TreasureFairyInfoModel * info = [_datasource safeObjectAtIndex1:0]; + TreasureFairyInfoModel * info = [_datasource xpSafeObjectAtIndex:0]; if (info.propType == TreasureFairyPropType_Piece) { self.titleLabel.text = YMLocalizedString(@"XPTreasureFairyStoreResultSmallView1"); }else if(info.propType == TreasureFairyPropType_Salvage){ diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreResultView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreResultView.m index 231b8c32..989e0786 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreResultView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreResultView.m @@ -111,7 +111,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPTreasureFairyStoreResultCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPTreasureFairyStoreResultCell class]) forIndexPath:indexPath]; - TreasureFairyInfoModel * info = [self.datasource safeObjectAtIndex1:indexPath.row]; + TreasureFairyInfoModel * info = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.prizeInfo = info; return cell; } @@ -139,7 +139,7 @@ self.oneGiftView.hidden = NO; self.collectionView.hidden = YES; if (_datasource.count == 1) { - TreasureFairyInfoModel * info = [_datasource safeObjectAtIndex1:0]; + TreasureFairyInfoModel * info = [_datasource xpSafeObjectAtIndex:0]; if(info.propType == TreasureFairyPropType_Piece) { self.titleLabel.text = YMLocalizedString(@"XPTreasureFairyStoreResultView0"); } else { diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreView.m index 2efa85b6..50a21666 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyStoreView.m @@ -349,7 +349,7 @@ NSMutableArray * resultList = [NSMutableArray array]; TreasureFairyInfoModel * pieceInfo; for (int i = 0; i< array.count; i++) { - TreasureFairyInfoModel * model = [array safeObjectAtIndex1:i]; + TreasureFairyInfoModel * model = [array xpSafeObjectAtIndex:i]; if(model.propType == TreasureFairyPropType_Piece) { pieceInfo = model; } else { @@ -481,7 +481,7 @@ }]; NSString *encodingUrl = [animtionName stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet]; NSString *fileName = [[encodingUrl componentsSeparatedByString:@"/"] lastObject]; - NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; + NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){ [view setMute:NO]; diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairySummonView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairySummonView.m index b4824386..36ad1feb 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairySummonView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairySummonView.m @@ -280,9 +280,9 @@ self.rewardInfo = rewardInfo; self.highGiftView.rewardInfo = rewardInfo; for (int i = 0; i < self.ballViewList.count; i++) { - XPTreasureFailrySummonBallView * view = [self.ballViewList safeObjectAtIndex1:i]; + XPTreasureFailrySummonBallView * view = [self.ballViewList xpSafeObjectAtIndex:i]; if (i < self.ballInfo.highElves.count) { - TreasureFairyBallModel * info = [self.ballInfo.highElves safeObjectAtIndex1:i]; + TreasureFairyBallModel * info = [self.ballInfo.highElves xpSafeObjectAtIndex:i]; view.ballInfo = info; } } @@ -314,9 +314,9 @@ self.middleGiftView.rewardInfo = rewardInfo; self.lowGiftView.rewardInfo = rewardInfo; for (int i = 0; i < self.ballViewList.count; i++) { - XPTreasureFailrySummonBallView * view = [self.ballViewList safeObjectAtIndex1:i]; + XPTreasureFailrySummonBallView * view = [self.ballViewList xpSafeObjectAtIndex:i]; if (i < self.ballInfo.middleElves.count) { - TreasureFairyBallModel * info = [self.ballInfo.middleElves safeObjectAtIndex1:i]; + TreasureFairyBallModel * info = [self.ballInfo.middleElves xpSafeObjectAtIndex:i]; view.ballInfo = info; } } @@ -347,9 +347,9 @@ self.lowGiftView.rewardInfo = rewardInfo; self.rewardInfo = rewardInfo; for (int i = 0; i < self.ballViewList.count; i++) { - XPTreasureFailrySummonBallView * view = [self.ballViewList safeObjectAtIndex1:i]; + XPTreasureFailrySummonBallView * view = [self.ballViewList xpSafeObjectAtIndex:i]; if (i < self.ballInfo.lowElves.count) { - TreasureFairyBallModel * info = [self.ballInfo.lowElves safeObjectAtIndex1:i]; + TreasureFairyBallModel * info = [self.ballInfo.lowElves xpSafeObjectAtIndex:i]; view.ballInfo = info; } } diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyTrialsContentView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyTrialsContentView.m index e63c364f..6282b179 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyTrialsContentView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyTrialsContentView.m @@ -220,14 +220,14 @@ - (void)reloadBallViews { for (int i = 0; i< self.ballViewList.count; i++) { - NetImageView * imageView = [self.ballViewList safeObjectAtIndex1:i]; + NetImageView * imageView = [self.ballViewList xpSafeObjectAtIndex:i]; imageView.image = nil; } for (int i = 0; i< self.ballList.count; i++) { - TreasureFairyBallModel * info = [self.ballList safeObjectAtIndex1:i]; + TreasureFairyBallModel * info = [self.ballList xpSafeObjectAtIndex:i]; if (i < self.ballViewList.count) { - NetImageView * imageView = [self.ballViewList safeObjectAtIndex1:i]; + NetImageView * imageView = [self.ballViewList xpSafeObjectAtIndex:i]; imageView.imageUrl = info.elfPicUrl; } } @@ -240,7 +240,7 @@ if (self.ballList.count == count) { NSMutableArray * array = [NSMutableArray array]; for (int i = 0; i < self.ballList.count; i++) { - TreasureFairyBallModel * ballInfo = [self.ballList safeObjectAtIndex1:i]; + TreasureFairyBallModel * ballInfo = [self.ballList xpSafeObjectAtIndex:i]; NSMutableDictionary * dic = [NSMutableDictionary dictionary]; [dic safeSetObject:@(ballInfo.chooseNum) forKey:@"elfNum"]; [dic safeSetObject:@(ballInfo.elfId) forKey:@"elfId"]; @@ -286,7 +286,7 @@ } NSString *encodingUrl = [animtionName stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet]; NSString *fileName = [[encodingUrl componentsSeparatedByString:@"/"] lastObject]; - NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; + NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){ [self.trialsView setMute:NO]; @@ -338,12 +338,12 @@ [self.ballList removeAllObjects]; self.originBallList = nil; for (int i = 0; i < self.datasource.count; i++) { - TreasureFairyBallModel * info = [self.datasource safeObjectAtIndex1:i]; + TreasureFairyBallModel * info = [self.datasource xpSafeObjectAtIndex:i]; info.chooseNum= 0; } for (int i = 0; i < self.datasource.count; i++) { - TreasureFairyBallModel * info = [self.datasource safeObjectAtIndex1:i]; + TreasureFairyBallModel * info = [self.datasource xpSafeObjectAtIndex:i]; NSInteger count = self.isHigh ? 5 : 1; if (self.ballList.count == count) { break; @@ -355,7 +355,7 @@ for (int j = 0; j< info.elfNum; j++) { info.chooseNum += 1; if (i < self.viewList.count) { - XPTreasureFairyTrialsBallView * ballView = [self.viewList safeObjectAtIndex1:i]; + XPTreasureFairyTrialsBallView * ballView = [self.viewList xpSafeObjectAtIndex:i]; ballView.ballInfo = info; } TreasureFairyBallModel * ball = [TreasureFairyBallModel modelWithDictionary:[info model2dictionary]]; @@ -382,15 +382,15 @@ [self.ballList removeAllObjects]; self.originBallList = nil; for (int i = 0; i < self.ballViewList.count; i++) { - NetImageView * imageView = [self.ballViewList safeObjectAtIndex1:i]; + NetImageView * imageView = [self.ballViewList xpSafeObjectAtIndex:i]; imageView.image = nil; } for (int i = 0; i < _datasource.count; i++) { - TreasureFairyBallModel * ballInfo = [self.datasource safeObjectAtIndex1:i]; + TreasureFairyBallModel * ballInfo = [self.datasource xpSafeObjectAtIndex:i]; ballInfo.chooseNum = 0; if (i < self.viewList.count) { - XPTreasureFairyTrialsBallView * ballView = [self.viewList safeObjectAtIndex1:i]; + XPTreasureFairyTrialsBallView * ballView = [self.viewList xpSafeObjectAtIndex:i]; ballView.ballInfo = ballInfo; } } @@ -428,14 +428,14 @@ } NetImageView * ballView = (NetImageView *)tap.view; NSInteger index= self.hidden ? (ballView.tag - 1000) : 0; - TreasureFairyBallModel * ballInfo = [self.originBallList safeObjectAtIndex1:index]; + TreasureFairyBallModel * ballInfo = [self.originBallList xpSafeObjectAtIndex:index]; ballView.image = nil; for (int i = 0; i< self.datasource.count; i++) { - TreasureFairyBallModel * ball = [self.datasource safeObjectAtIndex1:i]; + TreasureFairyBallModel * ball = [self.datasource xpSafeObjectAtIndex:i]; if (ball.elfId == ballInfo.elfId) { if (i < self.viewList.count) { - XPTreasureFairyTrialsBallView * ballView = [self.viewList safeObjectAtIndex1:i]; + XPTreasureFairyTrialsBallView * ballView = [self.viewList xpSafeObjectAtIndex:i]; ball.chooseNum -= 1; if (ball.chooseNum < 0) { ball.chooseNum = 0; @@ -500,9 +500,9 @@ _datasource = datasource; if (_datasource) { for (int i = 0; i < _datasource.count; i++) { - TreasureFairyBallModel * ballInfo = [self.datasource safeObjectAtIndex1:i]; + TreasureFairyBallModel * ballInfo = [self.datasource xpSafeObjectAtIndex:i]; if (i < self.viewList.count) { - XPTreasureFairyTrialsBallView * ballView = [self.viewList safeObjectAtIndex1:i]; + XPTreasureFairyTrialsBallView * ballView = [self.viewList xpSafeObjectAtIndex:i]; ballView.ballInfo = ballInfo; } } diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyTrialsRecordView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyTrialsRecordView.m index 0ff30a41..d2fd3120 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyTrialsRecordView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyTrialsRecordView.m @@ -154,7 +154,7 @@ if (cell == nil) { cell = [[XPTreasureFairyTrialsRecordCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPTreasureFairyTrialsRecordCell class])]; } - TreasureFairyTrialsRecordModel * info = [self.datasource safeObjectAtIndex1:indexPath.row]; + TreasureFairyTrialsRecordModel * info = [self.datasource xpSafeObjectAtIndex:indexPath.row]; cell.recordInfo = info; return cell; } diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/XPTreasureFairyViewController.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/XPTreasureFairyViewController.m index c4eb5720..c82393dd 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/XPTreasureFairyViewController.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/XPTreasureFairyViewController.m @@ -351,7 +351,7 @@ [self.animationView.subviews.firstObject removeFromSuperview]; } for (int i=0; i < self.animationView.subviews.count; i++) { - XPTreasureFailyPrizeGiftView * view = [self.animationView.subviews safeObjectAtIndex1:i]; + XPTreasureFailyPrizeGiftView * view = [self.animationView.subviews xpSafeObjectAtIndex:i]; NSInteger offsetY= (self.animationView.subviews.count - i) * (25 + 6); [UIView animateWithDuration:0.1 animations:^{ CGRect rect = view.frame; diff --git a/YuMi/Modules/YMRoom/View/UserCard/View/SubViews/XPUserCardSkillCardView.m b/YuMi/Modules/YMRoom/View/UserCard/View/SubViews/XPUserCardSkillCardView.m index 914a1a89..cc02a8f8 100644 --- a/YuMi/Modules/YMRoom/View/UserCard/View/SubViews/XPUserCardSkillCardView.m +++ b/YuMi/Modules/YMRoom/View/UserCard/View/SubViews/XPUserCardSkillCardView.m @@ -46,7 +46,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPUserCardSkillCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPUserCardSkillCollectionViewCell class]) forIndexPath:indexPath]; - cell.imageView.imageUrl = [self.dataArray safeObjectAtIndex1:indexPath.item]; + cell.imageView.imageUrl = [self.dataArray xpSafeObjectAtIndex:indexPath.item]; return cell; } @@ -60,7 +60,7 @@ CGFloat scale = image.size.width / (image.size.height > 0 ?image.size.height : 1) ; return CGSizeMake(20 * scale, height); } else { - NSURL *imgUrl = [NSURL URLWithString:[self.dataArray safeObjectAtIndex1:indexPath.item]]; + NSURL *imgUrl = [NSURL URLWithString:[self.dataArray xpSafeObjectAtIndex:indexPath.item]]; UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]]; CGFloat scale = myImage.size.width / (myImage.size.height > 0 ? myImage.size.height : 1); if (scale == 0) { diff --git a/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m b/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m index 9470fe55..e256cc31 100644 --- a/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m +++ b/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m @@ -786,7 +786,7 @@ if (self.datasource.count > 0) { - XPUserCardItemModel * model = [self.datasource safeObjectAtIndex1:indexPath.item]; + XPUserCardItemModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.item]; NSString * roomId = [NSString stringWithFormat:@"%ld", self.cardInfo.roomInfo.roomId];; NSString * roomUid = [NSString stringWithFormat:@"%ld", self.cardInfo.roomInfo.uid];; switch (model.type) { @@ -1046,7 +1046,7 @@ #pragma mark - UICollectionViewDataSource - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPUserCardItemCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPUserCardItemCollectionViewCell class]) forIndexPath:indexPath]; - cell.itemModel = [self.datasource safeObjectAtIndex1:indexPath.item]; + cell.itemModel = [self.datasource xpSafeObjectAtIndex:indexPath.item]; return cell; } diff --git a/YuMi/Modules/YMRoom/View/WishGift/View/View/XPWishGiftEnterView.m b/YuMi/Modules/YMRoom/View/WishGift/View/View/XPWishGiftEnterView.m index c8b5c00b..63e646e3 100644 --- a/YuMi/Modules/YMRoom/View/WishGift/View/View/XPWishGiftEnterView.m +++ b/YuMi/Modules/YMRoom/View/WishGift/View/View/XPWishGiftEnterView.m @@ -192,7 +192,7 @@ - (void)setupCustomCell:(UICollectionViewCell *)cell forIndex:(NSInteger)index cycleScrollView:(SDCycleScrollView *)view { XPWishGiftEnterCell *myCell = (XPWishGiftEnterCell *)cell; - WishGiftInfoModel * info = [self.giftList safeObjectAtIndex1:index]; + WishGiftInfoModel * info = [self.giftList xpSafeObjectAtIndex:index]; myCell.giftInfo = info; } #pragma mark - Getters And Setters diff --git a/YuMi/Modules/YMRoom/View/WishGift/View/View/XPWishGiftListView.m b/YuMi/Modules/YMRoom/View/WishGift/View/View/XPWishGiftListView.m index 08fcd7a7..4ead0c3e 100644 --- a/YuMi/Modules/YMRoom/View/WishGift/View/View/XPWishGiftListView.m +++ b/YuMi/Modules/YMRoom/View/WishGift/View/View/XPWishGiftListView.m @@ -151,7 +151,7 @@ cell = [[XPWishGiftListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPWishGiftListTableViewCell class])]; } if (self.datasource.count > 0 ) { - WishGiftInfoModel * giftInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + WishGiftInfoModel * giftInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; if (giftInfo.level > 0) { cell.titleLabel.text = giftInfo.levelName; } else { @@ -169,7 +169,7 @@ [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { if (self.delegate && [self.delegate respondsToSelector:@selector(xPWishGiftListView:didSelectItem:)]) { - WishGiftInfoModel * giftInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + WishGiftInfoModel * giftInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; [self configDefaultInfo:giftInfo]; [self.delegate xPWishGiftListView:self didSelectItem:giftInfo]; } diff --git a/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftCreateItemViewController.m b/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftCreateItemViewController.m index a536d94c..538714ee 100644 --- a/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftCreateItemViewController.m +++ b/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftCreateItemViewController.m @@ -199,7 +199,7 @@ - (void)handleLevleDatasource:(WishGiftLevel)levele { NSMutableArray * array = [self.levelLists mutableCopy]; for (int i = 0;i < self.levelLists.count;i++) { - WishGiftInfoModel * infor = [self.levelLists safeObjectAtIndex1:i]; + WishGiftInfoModel * infor = [self.levelLists xpSafeObjectAtIndex:i]; if (infor.level == levele) { [array removeObject:infor]; } @@ -210,7 +210,7 @@ - (void)handleGiftDatasource:(NSArray *)levels giftId:(NSInteger)giftId { NSMutableArray * array = [levels mutableCopy]; for (int i = 0;i < levels.count;i++) { - WishGiftInfoModel * infor = [levels safeObjectAtIndex1:i]; + WishGiftInfoModel * infor = [levels xpSafeObjectAtIndex:i]; if (infor.giftId == giftId) { [array removeObject:infor]; } diff --git a/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftCreateViewController.m b/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftCreateViewController.m index 7f7a71da..2ca7035b 100644 --- a/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftCreateViewController.m +++ b/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftCreateViewController.m @@ -138,7 +138,7 @@ if (cell == nil) { cell = [[XPWishGiftTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPWishGiftTableViewCell class])]; } - WishGiftInfoModel *giftInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + WishGiftInfoModel *giftInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row]; giftInfo.row = indexPath.row + 1; cell.giftInfo = giftInfo; cell.delegate = self; diff --git a/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftHistoryViewController.m b/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftHistoryViewController.m index 386d6194..895b7b07 100644 --- a/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftHistoryViewController.m +++ b/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftHistoryViewController.m @@ -73,7 +73,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if (self.datasource.count > 0) { - WishGiftHistoryModel *info = [self.datasource safeObjectAtIndex1:section]; + WishGiftHistoryModel *info = [self.datasource xpSafeObjectAtIndex:section]; return info.gifts.count; } return 0; @@ -85,8 +85,8 @@ if (cell == nil) { cell = [[XPWishGiftHistoryTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPWishGiftHistoryTableViewCell class])]; } - WishGiftHistoryModel *historyInfo = [self.datasource safeObjectAtIndex1:indexPath.section]; - WishGiftInfoModel * info= [historyInfo.gifts safeObjectAtIndex1:indexPath.row]; + WishGiftHistoryModel *historyInfo = [self.datasource xpSafeObjectAtIndex:indexPath.section]; + WishGiftInfoModel * info= [historyInfo.gifts xpSafeObjectAtIndex:indexPath.row]; info.row = (indexPath.row + 1); cell.giftInfo = info; if (indexPath.row == 0) { @@ -126,7 +126,7 @@ if (self.datasource.count > 0) { XPWishGiftSectionView * view = [[XPWishGiftSectionView alloc] init]; view.frame = CGRectMake(0, 0, KScreenWidth, 45); - WishGiftHistoryModel *historyInfo = [self.datasource safeObjectAtIndex1:section]; + WishGiftHistoryModel *historyInfo = [self.datasource xpSafeObjectAtIndex:section]; view.title = historyInfo.createDate; return view; } diff --git a/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftViewController.m b/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftViewController.m index e105f640..60a3975e 100644 --- a/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftViewController.m +++ b/YuMi/Modules/YMRoom/View/WishGift/View/XPWishGiftViewController.m @@ -186,9 +186,9 @@ #pragma mark - XPWishGiftProtocol - (void)getWishGiftAssistUserListSuccess:(NSArray *)list { for (int i = 0; i < self.userStackView.arrangedSubviews.count; i++) { - NetImageView * imageView = [self.userStackView.subviews safeObjectAtIndex1:i]; + NetImageView * imageView = [self.userStackView.subviews xpSafeObjectAtIndex:i]; if (i < list.count) { - WishGiftUserModel * userInfo = [list safeObjectAtIndex1:i]; + WishGiftUserModel * userInfo = [list xpSafeObjectAtIndex:i]; imageView.hidden = NO; imageView.imageUrl = userInfo.avatar; }else { @@ -221,9 +221,9 @@ } for (int i = 0; i < self.giftViews.count; i++) { - XPWishGiftInfoView * view = [self.giftViews safeObjectAtIndex1:i]; + XPWishGiftInfoView * view = [self.giftViews xpSafeObjectAtIndex:i]; if(i < list.count) { - WishGiftInfoModel * info = [list safeObjectAtIndex1:i]; + WishGiftInfoModel * info = [list xpSafeObjectAtIndex:i]; view.giftInfo = info; view.hidden = NO; } else { diff --git a/YuMi/Modules/YMRoom/View/XPMiniRoomView.m b/YuMi/Modules/YMRoom/View/XPMiniRoomView.m index fcb5547d..9095a206 100644 --- a/YuMi/Modules/YMRoom/View/XPMiniRoomView.m +++ b/YuMi/Modules/YMRoom/View/XPMiniRoomView.m @@ -234,7 +234,7 @@ UIKIT_EXTERN NSString *kRoomKickoutTime; if ([attachment.data[@"data"] isKindOfClass:[NSArray class]]) { NSArray * array = [RoomFaceSendInfoModel modelsWithArray:attachment.data[@"data"]]; for (int i = 0; i< array.count; i++) { - RoomFaceSendInfoModel * sendInfo = [array safeObjectAtIndex1:i]; + RoomFaceSendInfoModel * sendInfo = [array xpSafeObjectAtIndex:i]; if (sendInfo.resultIndexes.count <=0) { return NO; } @@ -794,11 +794,11 @@ UIKIT_EXTERN NSString *kRoomKickoutTime; if (self.currentMusic) { [[RtcManager instance] changePlayState:BackMusicPlayState_Resume]; } else { - Music * music = [array safeObjectAtIndex1:index]; + Music * music = [array xpSafeObjectAtIndex:index]; [self playCurrentMusic:music index:index]; } } else { - Music * music = [array safeObjectAtIndex1:index]; + Music * music = [array xpSafeObjectAtIndex:index]; [self playCurrentMusic:music index:index]; } } diff --git a/YuMi/Modules/YMRoom/View/XPRoomViewController.m b/YuMi/Modules/YMRoom/View/XPRoomViewController.m index c67df568..530f2c52 100644 --- a/YuMi/Modules/YMRoom/View/XPRoomViewController.m +++ b/YuMi/Modules/YMRoom/View/XPRoomViewController.m @@ -2220,7 +2220,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出 [self.view endEditing:YES]; [self showAnchorLoading]; if (self.anchorIndex < self.anchorRoomList.count) { - NSString * roomUid = [self.anchorRoomList safeObjectAtIndex1:self.anchorIndex]; + NSString * roomUid = [self.anchorRoomList xpSafeObjectAtIndex:self.anchorIndex]; [self.presenter getCurrentRoomInfo:roomUid]; self.anchorIndex --; }else { diff --git a/YuMi/Modules/YMTabbar/View/AnchorCard/XPAnchorCardView.m b/YuMi/Modules/YMTabbar/View/AnchorCard/XPAnchorCardView.m index ed25c177..3731b361 100644 --- a/YuMi/Modules/YMTabbar/View/AnchorCard/XPAnchorCardView.m +++ b/YuMi/Modules/YMTabbar/View/AnchorCard/XPAnchorCardView.m @@ -207,7 +207,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPAnchorCardSkillCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPAnchorCardSkillCollectionViewCell class]) forIndexPath:indexPath]; - cell.imageView.imageUrl = [self.cardInfo.absCardPics safeObjectAtIndex1:indexPath.item]; + cell.imageView.imageUrl = [self.cardInfo.absCardPics xpSafeObjectAtIndex:indexPath.item]; return cell; } @@ -221,7 +221,7 @@ CGFloat scale = image.size.width / image.size.height; return CGSizeMake(15 * scale, height); } else { - NSURL *imgUrl = [NSURL URLWithString:[self.cardInfo.absCardPics safeObjectAtIndex1:indexPath.item]]; + NSURL *imgUrl = [NSURL URLWithString:[self.cardInfo.absCardPics xpSafeObjectAtIndex:indexPath.item]]; UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]]; CGFloat scale = myImage.size.width / myImage.size.height; if (scale == 0) { @@ -240,7 +240,7 @@ if(self.cardInfo.voiceCard.propVals.count) { NSString *fileName = [[self.cardInfo.voiceCard.name componentsSeparatedByString:@"/"] lastObject]; fileName = [NSString stringWithFormat:@"%zd_%@", self.cardInfo.uid, fileName]; - NSString * url = [self.cardInfo.voiceCard.propVals safeObjectAtIndex1:0]; + NSString * url = [self.cardInfo.voiceCard.propVals xpSafeObjectAtIndex:0]; NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:@"mineSkillCardVoice"]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]) { diff --git a/YuMi/Tools/File/UploadFile.m b/YuMi/Tools/File/UploadFile.m index 045a6c76..889d271f 100644 --- a/YuMi/Tools/File/UploadFile.m +++ b/YuMi/Tools/File/UploadFile.m @@ -235,7 +235,7 @@ static UploadFile* manager; NSArray *urlList = [fileName componentsSeparatedByString:@".com/"]; // 对象键,是对象在 COS 上的完整路径,如果带目录的话,格式为 "video/xxx/movie.mp4" - request.object = [urlList safeObjectAtIndex1:1]; + request.object = [urlList xpSafeObjectAtIndex:1]; // 设置下载的路径 URL,如果设置了,文件将会被下载到指定路径中 @@ -276,7 +276,7 @@ static UploadFile* manager; NSURLRequest *request = [NSURLRequest requestWithURL :url]; NSURLSessionDownloadTask *download = [manager downloadTaskWithRequest:request progress:^(NSProgress * _Nonnull downloadProgress) { } destination:^NSURL * _Nonnull(NSURL * _Nonnull targetPath, NSURLResponse * _Nonnull response) { - NSString *filePath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:mainFileName] stringByAppendingPathComponent:fileName]; + NSString *filePath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:mainFileName] stringByAppendingPathComponent:fileName]; return [NSURL fileURLWithPath:filePath]; } completionHandler:^(NSURLResponse * _Nonnull response, NSURL * _Nullable filePath, NSError * _Nullable error) { if (!error) { @@ -372,7 +372,7 @@ static UploadFile* manager; } - (NSString *)cacheFilePath { - return [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) safeObjectAtIndex1:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; + return [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) xpSafeObjectAtIndex:0] stringByAppendingPathComponent:@"GiftDynamicEffectList"]; } @end diff --git a/YuMi/Tools/Safe/NSArray+Safe.h b/YuMi/Tools/Safe/NSArray+Safe.h index b362fe79..4e4b098a 100644 --- a/YuMi/Tools/Safe/NSArray+Safe.h +++ b/YuMi/Tools/Safe/NSArray+Safe.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN @interface NSArray (Safe) --(id)safeObjectAtIndex1:(NSUInteger)index; +-(id)xpSafeObjectAtIndex:(NSUInteger)index; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Tools/Safe/NSArray+Safe.m b/YuMi/Tools/Safe/NSArray+Safe.m index fa00d819..13729c74 100644 --- a/YuMi/Tools/Safe/NSArray+Safe.m +++ b/YuMi/Tools/Safe/NSArray+Safe.m @@ -9,7 +9,7 @@ @implementation NSArray (Safe) --(id)safeObjectAtIndex1:(NSUInteger)index{ +-(id)xpSafeObjectAtIndex:(NSUInteger)index{ if ([self isKindOfClass:[NSArray class]]){ if (self.count){ if (self.count>index){ diff --git a/YuMi/Tools/sdkContent/content/K/BSDrawLine.m b/YuMi/Tools/sdkContent/content/K/BSDrawLine.m index 0619b578..c0943224 100644 --- a/YuMi/Tools/sdkContent/content/K/BSDrawLine.m +++ b/YuMi/Tools/sdkContent/content/K/BSDrawLine.m @@ -355,9 +355,9 @@ UIBezierPath* path = [UIBezierPath bezierPath]; [path setLineWidth:lineWidth]; for(int i=0; i<[lineArr2_1 count]-1; i++){ - if([lineArr2_1 safeObjectAtIndex1:i] != nil && [lineArr2_1 safeObjectAtIndex1:i+1] != nil){ - CGPoint firstPoint = [[lineArr2_1 safeObjectAtIndex1:i] CGPointValue]; - CGPoint secondPoint = [[lineArr2_1 safeObjectAtIndex1:i+1] CGPointValue]; + if([lineArr2_1 xpSafeObjectAtIndex:i] != nil && [lineArr2_1 xpSafeObjectAtIndex:i+1] != nil){ + CGPoint firstPoint = [[lineArr2_1 xpSafeObjectAtIndex:i] CGPointValue]; + CGPoint secondPoint = [[lineArr2_1 xpSafeObjectAtIndex:i+1] CGPointValue]; [path moveToPoint:firstPoint]; // 核心方法ios 如何根据坐标点画曲线