diff --git a/yinmeng-ios/Base/Security/YinGetPointGroup.m b/yinmeng-ios/Base/Security/YinGetPointGroup.m index e67f2be..6c14e30 100644 --- a/yinmeng-ios/Base/Security/YinGetPointGroup.m +++ b/yinmeng-ios/Base/Security/YinGetPointGroup.m @@ -43,7 +43,7 @@ CAKeyframeAnimation *animation3 = [CAKeyframeAnimation animation]; animation3.duration = 0.8; - animation3.beginTime = 2.6;//0.8+0.8+1 + animation3.beginTime = 2.6; animation3.keyPath = @"transform.scale"; animation3.values = @[@3,@2.5,@2,@1.5,@1]; animation3.repeatCount = 1; diff --git a/yinmeng-ios/Modules/Room/VC/RoomVC.swift b/yinmeng-ios/Modules/Room/VC/RoomVC.swift index 0a20571..4a15157 100644 --- a/yinmeng-ios/Modules/Room/VC/RoomVC.swift +++ b/yinmeng-ios/Modules/Room/VC/RoomVC.swift @@ -332,50 +332,53 @@ extension RoomVC : NIMChatManagerDelegate, NIMChatroomManagerDelegate, NIMLoginM }else if msg.messageType == .custom{ chatScreenView.dealWithCustomMsg(msg: msg) roomEffectView.dealWithCustomMsg(msg: msg) - if let obj = msg.messageObject as? NIMCustomObject,let customObj = obj.attachment as? ChatCustomMsgModel{ - if customObj.first == 3 || customObj.first == 12{ - if let model = Deserialized.toModel(with: customObj.data),let gift = model.gift == nil ? model.giftInfo : model.gift { - var userList:[String] = [] - if userList.count <= 0 { - for item in model.targetUsers { - userList.append("\(item.uid)") - } - if userList.count <= 0{ - userList.append(model.targetUid) - } - } - var starPoint = CGPoint(x: ScreenWidth/2, y: NavHeight) - if let point = micSeatView.getPointWithCell(uid: model.uid){ - if point.x <= 0 || point.y <= 0{ - - }else{ - starPoint = point - } - } - - var curPoint = CGPoint(x: ScreenWidth/2, y: NavHeight) - for userUid in userList{ - - if let point = micSeatView.getPointWithCell(uid: userUid){ - if point.x <= 0 || point.y <= 0{ - - }else{ - curPoint = point - } - } - - roomEffectView.startPlayAnimation(url: gift.giftUrl, start: starPoint, end: curPoint) - } - - } - } - } + startPlayAnimation(msg: msg) } micSeatView.dealWithNotMessage(msg: msg) menuView.dealWithNotMessage(msg: msg) } } + func startPlayAnimation(msg:NIMMessage){ + if let obj = msg.messageObject as? NIMCustomObject,let customObj = obj.attachment as? ChatCustomMsgModel{ + if customObj.first == 3 || customObj.first == 12{ + if let model = Deserialized.toModel(with: customObj.data),let gift = model.gift == nil ? model.giftInfo : model.gift { + var userList:[String] = [] + if userList.count <= 0 { + for item in model.targetUsers { + userList.append("\(item.uid)") + } + if userList.count <= 0{ + userList.append(model.targetUid) + } + } + var starPoint = CGPoint(x: ScreenWidth/2, y: NavHeight) + if let point = micSeatView.getPointWithCell(uid: model.uid){ + if point.x <= 0 || point.y <= 0{ + + }else{ + starPoint = point + } + } + + var curPoint = CGPoint(x: ScreenWidth/2, y: NavHeight) + for userUid in userList{ + + if let point = micSeatView.getPointWithCell(uid: userUid){ + if point.x <= 0 || point.y <= 0{ + + }else{ + curPoint = point + } + } + + roomEffectView.startPlayAnimation(url: gift.giftUrl, start: starPoint, end: curPoint) + } + + } + } + } + } func send(_ message: NIMMessage, didCompleteWithError error: Error?) { if let sessionId = message.session?.sessionId,let roomUid = self.roomInfo?.roomId,sessionId != roomUid{ return @@ -385,6 +388,7 @@ extension RoomVC : NIMChatManagerDelegate, NIMChatroomManagerDelegate, NIMLoginM }else if message.messageType == .custom{ chatScreenView.dealWithCustomMsg(msg: message) roomEffectView.dealWithCustomMsg(msg: message) + startPlayAnimation(msg: message) } } func updateOnlineNum(num:Int){ diff --git a/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/NormalMicSeatSuperView.swift b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/NormalMicSeatSuperView.swift index a9d1648..e7c419b 100644 --- a/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/NormalMicSeatSuperView.swift +++ b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/NormalMicSeatSuperView.swift @@ -326,7 +326,7 @@ extension NormalMicSeatSuperView:UICollectionViewDelegate,UICollectionViewDataSo if let cell = collectionView.cellForItem(at: IndexPath(row: i, section: 0)) as? NormalMicSeatCell{ if let user = cell.user,let curUid = user.uid,"\(curUid)" == uid{ let width = (ScreenWidth - UIDevice.scaleWidth(width: 20))/4 - let x = CGFloat(i) * width + UIDevice.scaleWidth(width: 10) + width / 2 + let x = CGFloat(i%4) * width + UIDevice.scaleWidth(width: 10) + width / 2 point = CGPoint(x: x, y: i < 4 ? UIDevice.scaleWidth(width: 273) : UIDevice.scaleWidth(width: 418)) break }