优化。修复bug

This commit is contained in:
liyuhua
2023-07-21 18:53:10 +08:00
parent bea4ee9c6c
commit 447b189d4f
13 changed files with 239 additions and 220 deletions

View File

@@ -31,7 +31,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"

View File

@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
@end
@interface SessionSettingTableViewCell : UITableViewCell
@property (nonatomic,strong) SessionSettingModel *settingItem;
@property (nonatomic,strong) SessionSettingModel *chatItem;
///代理
@property (nonatomic,weak) id<SessionSettingTableViewCellDelegate> delegate;
@end

View File

@@ -76,42 +76,43 @@
#pragma mark - Event Response
- (void)switchDidChange:(UISwitch *)switchOn {
if (self.delegate && [self.delegate respondsToSelector:@selector(sessionSettingTableViewCell:switchState:)]) {
[self.delegate sessionSettingTableViewCell:self.settingItem switchState:switchOn];
[self.delegate sessionSettingTableViewCell:self.chatItem switchState:switchOn];
}
}
#pragma mark - Getters And Setters
- (void)setSettingItem:(SessionSettingModel *)settingItem {
_settingItem = settingItem;
if (_settingItem) {
self.titleLabel.text = _settingItem.title;
switch (_settingItem.settingType) {
case SessionSettingType_Top:
{
self.arrowImageView.hidden = YES;
self.switchView.hidden = NO;
self.switchView.on = _settingItem.state;
}
break;
case SessionSettingType_black:
{
self.arrowImageView.hidden = YES;
self.switchView.hidden = NO;
self.switchView.on = _settingItem.state;
}
break;
case SessionSettingType_report:
{
self.arrowImageView.hidden = NO;
self.switchView.hidden = YES;
}
break;
default:
break;
}
}
- (void)setChatItem:(SessionSettingModel *)chatItem{
_chatItem = chatItem;
if ( _chatItem) {
self.titleLabel.text = _chatItem.title;
switch (_chatItem.settingType) {
case SessionSettingType_Top:
{
self.arrowImageView.hidden = YES;
self.switchView.hidden = NO;
self.switchView.on = _chatItem.state;
}
break;
case SessionSettingType_black:
{
self.arrowImageView.hidden = YES;
self.switchView.hidden = NO;
self.switchView.on = _chatItem.state;
}
break;
case SessionSettingType_report:
{
self.arrowImageView.hidden = NO;
self.switchView.hidden = YES;
}
break;
default:
break;
}
}
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];

View File

@@ -78,7 +78,7 @@
cell = [[SessionSettingTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([SessionSettingTableViewCell class])];
}
SessionSettingModel * model= [self.datasource safeObjectAtIndex1:indexPath.row];
cell.settingItem = model;
cell.chatItem = model;
cell.delegate = self;
return cell;
}

View File

@@ -141,7 +141,7 @@
///
@property(nonatomic,assign) BOOL isPlayOfB;
///animationListAanimationListBanimationListAanimationListB
@property(nonatomic,assign) BOOL isAnimationListAFinish;
//@property(nonatomic,assign) BOOL isAnimationListAFinish;
@property(nonatomic,strong) NSMutableArray *svgaQueue;
@end
@@ -358,7 +358,7 @@
- (void)createStarKitchenBannerAnimation:(PIBaseAnimationViewModel *)attacment{
self.isPlayOfB = YES;
CGFloat top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
CGFloat top = self.isPlayOfA == YES ? 215 : (kNavigationHeight + 15);
XPRoomStarKitchenBannerView *starKitchenView = [[XPRoomStarKitchenBannerView alloc]initWithFrame:CGRectMake(0, top, KScreenWidth, kGetScaleWidth(60))];
starKitchenView.isSvga = attacment.second == Custom_Message_Sub_Star_Kitchen_Server;
XPRoomStarKitchenModel *starModel = [XPRoomStarKitchenModel modelWithDictionary:attacment.data];
@@ -389,12 +389,12 @@
if(self.animationListB.count > 0){
[self.animationListB removeObjectAtIndex:0];
}
if(self. isAnimationListAFinish == YES){
[self playAnimationWithModel];
self.isAnimationListAFinish = NO;
return;
}
// if(self. isAnimationListAFinish == YES){
//
// [self playAnimationWithModel];
// self.isAnimationListAFinish = NO;
// return;
// }
[self playAnimationWithModel];
}
}];
@@ -758,7 +758,7 @@
- (void)createCandyTreeBannerAnimation:(PIBaseAnimationViewModel *)attatchment {
CGFloat kscale = (CGFloat)60 / (CGFloat)375;
self.isPlayOfB = YES;
CGFloat top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
CGFloat top = self.isPlayOfA == YES ? 215 : (kNavigationHeight + 15);
XPRoomCandyGiftView *candyTreeView = [[XPRoomCandyGiftView alloc] initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth , KScreenWidth * kscale)];
candyTreeView.isMaxLargeGift = attatchment.second == Custom_Message_Sub_Look_Love_InRoom_NeedAllMicSend;
candyTreeView.candyInfo = attatchment.data;
@@ -862,7 +862,7 @@
- (void)createNobleLevelUpBannerAnimation:(PIBaseAnimationViewModel *)model {
self.isPlayOfB = YES;
CGFloat top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
CGFloat top = self.isPlayOfA == YES ? 215 : (kNavigationHeight + 15);
XPRoomNobleLevelUpView *nobleLevelUpView = [[XPRoomNobleLevelUpView alloc] initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth, 90)];
nobleLevelUpView.nobleInfo = model.data;
@@ -890,12 +890,12 @@
if (self.animationListB.count > 0) {
[self.animationListB removeObjectAtIndex:0];
}
if(self.isAnimationListAFinish == YES){
[self playAnimationWithModel];
self.isAnimationListAFinish = NO;
return;
}
// if(self.isAnimationListAFinish == YES){
//
// [self playAnimationWithModel];
// self.isAnimationListAFinish = NO;
// return;
// }
[self playAnimationWithModel];
}
}];
@@ -964,7 +964,7 @@
}
- (void)createLicneseHourRankAnimation:(PIBaseAnimationViewModel *)attachment {
self.isPlayOfB = YES;
CGFloat top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
CGFloat top = self.isPlayOfA == YES ? 215 : (kNavigationHeight + 15);
XPRoomLicneseHourRankView *anchorRankView = [[XPRoomLicneseHourRankView alloc] initWithFrame:CGRectMake(KScreenWidth, top, 375, 60)];
anchorRankView.delegate = self;
anchorRankView.licneseRankInfo = [RoomHalfHourRankModel modelWithDictionary:attachment.data];
@@ -990,11 +990,11 @@
if(self.animationListB.count > 0){
[self.animationListB removeObjectAtIndex:0];
}
if(self.isAnimationListAFinish == YES){
self.isAnimationListAFinish = NO;
[self playAnimationWithModel];
return;
}
// if(self.isAnimationListAFinish == YES){
// self.isAnimationListAFinish = NO;
// [self playAnimationWithModel];
// return;
// }
[self playAnimationWithModel];
}];
[anchorRankView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
@@ -1023,7 +1023,7 @@
}
- (void)createAnchorHourRankAnimation:(PIBaseAnimationViewModel *)attachment {
self.isPlayOfB = YES;
CGFloat top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
CGFloat top = self.isPlayOfA == YES ? 215 : (kNavigationHeight + 15);
XPRoomAnchorRankBannerView *anchorRankView = [[XPRoomAnchorRankBannerView alloc] initWithFrame:CGRectMake(KScreenWidth,top, KScreenWidth, 60)];
anchorRankView.anchorRankInfo = [RoomHalfHourRankModel modelWithDictionary:attachment.data];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gotoTopRankAnchorRoom:)];
@@ -1049,11 +1049,11 @@
if(self.animationListB.count > 0){
[self.animationListB removeObjectAtIndex:0];
}
if(self.isAnimationListAFinish == YES){
self.isAnimationListAFinish = NO;
[self playAnimationWithModel];
return;
}
// if(self.isAnimationListAFinish == YES){
// self.isAnimationListAFinish = NO;
// [self playAnimationWithModel];
// return;
// }
[self playAnimationWithModel];
}];
[anchorRankView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
@@ -1384,7 +1384,7 @@
- (void)createBigPrizeAnimation:(PIBaseAnimationViewModel *)prizeModel {
self.isPlayOfB = YES;
CGFloat top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
CGFloat top = self.isPlayOfA == YES ? 215 : (kNavigationHeight + 15);
self.isLuckyGiftAnimation = YES;
@@ -1399,35 +1399,20 @@
springAnimation.springBounciness = 10.f;
springAnimation.fromValue = [NSValue valueWithCGPoint:luckyGiftEffectView.center];
springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(KScreenWidth / 2, luckyGiftEffectView.center.y)];
[springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
if (finished) {
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(KScreenWidth / 2, luckyGiftEffectView.center.y)];
moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth, luckyGiftEffectView.center.y)];
moveAnimation.beginTime = CACurrentMediaTime() + 3;
moveAnimation.duration = 0.5;
moveAnimation.repeatCount = 1;
moveAnimation.removedOnCompletion = YES;
[moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
[luckyGiftEffectView removeFromSuperview];
if (self.animationListB.count > 0) {
[self.animationListB removeObjectAtIndex:0];
}
self.isPlayOfB = NO;
if(self.isAnimationListAFinish == YES){
self.isAnimationListAFinish = NO;
[self playAnimationWithModel];
return;
}
[self playAnimationWithModel];
}];
[luckyGiftEffectView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
}
}];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 6 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
[luckyGiftEffectView removeFromSuperview];
if (self.animationListB.count > 0) {
[self.animationListB removeObjectAtIndex:0];
}
self.isPlayOfB = NO;
// if(self.isAnimationListAFinish == YES){
// self.isAnimationListAFinish = NO;
// [self playAnimationWithModel];
// return;
// }
[self playAnimationWithModel];
});
[luckyGiftEffectView pop_addAnimation:springAnimation forKey:@"nobleLevelUpspingOutAnimation"];
}
-(void)playAnimationACompletion{
@@ -1448,7 +1433,7 @@
}
-(void)playAnimationWithModel{
if(self.isAnimationListAFinish == YES)return;
// if(self.isAnimationListAFinish == YES)return;
if(self.animationListB.count <= 0){
if(self.animationListA.count > 0 && self.isPlayOfB == NO && self.isPlayOfA == NO){
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
@@ -1567,7 +1552,7 @@
if(self.svgaQueue.count > 0 && self.isLargeGiftAnimating == NO){
[self createGiftSvgaAnimation:self.svgaQueue.firstObject];
}
}
@@ -1622,7 +1607,7 @@
}
[self removeGiftBannerView:view];
[view configGiftBanner:receiveInfo users:[self makeBannerUsers]];
view.frame = CGRectMake(KScreenWidth, 100, KScreenWidth, 153);
view.frame = CGRectMake(KScreenWidth, 80, KScreenWidth, 153);
[self.highLevleView addSubview:view];
POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter];
springAnimation.springSpeed = 12;
@@ -1686,7 +1671,6 @@
moveAnimation.removedOnCompletion = YES;
moveAnimation.completionBlock = ^(POPAnimation *anim, BOOL finished) {
if(finished){
view.frame = CGRectMake(KScreenWidth, 100, KScreenWidth, 0);;
[view removeFromSuperview];
self.isPlayOfA = NO;
if(self.animationListA.count > 0){
@@ -1695,8 +1679,8 @@
if(self.animationListB.count > 0){
self.isAnimationListAFinish = YES;
[self playAnimationACompletion];
// self.isAnimationListAFinish = YES;
[self playAnimationWithModel];
return;
}
if(self.animationListA.count > 0 && self.isPlayOfB == NO && self.isPlayOfA == NO){
@@ -1735,37 +1719,37 @@
make.height.mas_equalTo(KScreenHeight);
}];
}
NSString *baseFileName = @"/GiftSvga";
NSString *filePath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:baseFileName] stringByAppendingPathComponent:vggUrl];
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:filePath]){
NSData *data=[NSData dataWithContentsOfFile:filePath options:0 error:NULL];
[self.parser parseWithData:data cacheKey:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
if (videoItem != nil) {
CGFloat width = videoItem.videoSize.width;
CGFloat height = videoItem.videoSize.height;
if (width > height) {
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
} else {//
CGFloat resizeH = KScreenWidth * height / width;//
if (resizeH > KScreenHeight) {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFill;
} else {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
}
}
self.giftEffectView.alpha = 1;
self.giftEffectView.loops = 1;
self.giftEffectView.clearsAfterStop = YES;
self.giftEffectView.videoItem = videoItem;
[self.giftEffectView startAnimation];
}
} failureBlock:^(NSError * _Nonnull error) {
self.giftEffectView.hidden = YES;
}];
return;
};
// NSString *baseFileName = @"/GiftSvga";
// NSString *filePath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:baseFileName] stringByAppendingPathComponent:vggUrl];
// NSFileManager *fileManager = [NSFileManager defaultManager];
// if ([fileManager fileExistsAtPath:filePath]){
// NSData *data=[NSData dataWithContentsOfFile:filePath options:0 error:NULL];
// [self.parser parseWithData:data cacheKey:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
// if (videoItem != nil) {
// CGFloat width = videoItem.videoSize.width;
// CGFloat height = videoItem.videoSize.height;
// if (width > height) {
// self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
// } else {//
// CGFloat resizeH = KScreenWidth * height / width;//
// if (resizeH > KScreenHeight) {//
// self.giftEffectView.contentMode = UIViewContentModeScaleAspectFill;
// } else {//
// self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
// }
// }
// self.giftEffectView.alpha = 1;
// self.giftEffectView.loops = 1;
// self.giftEffectView.clearsAfterStop = YES;
// self.giftEffectView.videoItem = videoItem;
// [self.giftEffectView startAnimation];
// }
// } failureBlock:^(NSError * _Nonnull error) {
// self.giftEffectView.hidden = YES;
// }];
// return;
//
// };
[self.parser parseWithURL:[NSURL URLWithString:vggUrl] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
if (videoItem != nil) {
@@ -1804,12 +1788,12 @@
make.height.mas_equalTo(KScreenHeight);
}];
}
NSString *baseFileName = @"/GiftMp4";
NSString *filePath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:baseFileName] stringByAppendingPathComponent:vapUrl];
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:filePath]){
vapUrl = filePath;
}
// NSString *baseFileName = @"/GiftMp4";
// NSString *filePath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:baseFileName] stringByAppendingPathComponent:vapUrl];
// NSFileManager *fileManager = [NSFileManager defaultManager];
// if ([fileManager fileExistsAtPath:filePath]){
// vapUrl = filePath;
// }
[self.vapParser parseWithURL:vapUrl completionBlock:^(NSString * _Nullable videoUrl) {
if (videoUrl.length) {
[self.vapGiftEffectView setMute:YES];
@@ -1833,37 +1817,37 @@
}];
}
NSString *baseFileName = @"/GiftSvga";
NSString *filePath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:baseFileName] stringByAppendingPathComponent:vggUrl.absoluteString];
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:filePath]){
NSData *data=[NSData dataWithContentsOfFile:filePath options:0 error:NULL];
[self.parser parseWithData:data cacheKey:@"" completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
if (videoItem != nil) {
CGFloat width = videoItem.videoSize.width;
CGFloat height = videoItem.videoSize.height;
if (width > height) {
self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFit;
} else {//
CGFloat resizeH = KScreenWidth * height / width;//
if (resizeH > KScreenHeight) {//
self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFill;
} else {//
self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFit;
}
}
self.luckyGiftEffectView.alpha = 1;
self.luckyGiftEffectView.loops = 1;
self.luckyGiftEffectView.clearsAfterStop = YES;
self.luckyGiftEffectView.videoItem = videoItem;
[self.luckyGiftEffectView startAnimation];
}
} failureBlock:^(NSError * _Nonnull error) {
self.luckyGiftEffectView.hidden = YES;
}];
return;
};
// NSString *baseFileName = @"/GiftSvga";
// NSString *filePath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:baseFileName] stringByAppendingPathComponent:vggUrl.absoluteString];
// NSFileManager *fileManager = [NSFileManager defaultManager];
// if ([fileManager fileExistsAtPath:filePath]){
// NSData *data=[NSData dataWithContentsOfFile:filePath options:0 error:NULL];
// [self.parser parseWithData:data cacheKey:@"" completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
// if (videoItem != nil) {
// CGFloat width = videoItem.videoSize.width;
// CGFloat height = videoItem.videoSize.height;
// if (width > height) {
// self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFit;
// } else {//
// CGFloat resizeH = KScreenWidth * height / width;//
// if (resizeH > KScreenHeight) {//
// self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFill;
// } else {//
// self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFit;
// }
// }
// self.luckyGiftEffectView.alpha = 1;
// self.luckyGiftEffectView.loops = 1;
// self.luckyGiftEffectView.clearsAfterStop = YES;
// self.luckyGiftEffectView.videoItem = videoItem;
// [self.luckyGiftEffectView startAnimation];
// }
// } failureBlock:^(NSError * _Nonnull error) {
// self.luckyGiftEffectView.hidden = YES;
// }];
// return;
//
// };
[self.parser parseWithURL:vggUrl completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
@@ -1902,12 +1886,12 @@
make.height.mas_equalTo(KScreenHeight);
}];
}
NSString *baseFileName = @"/GiftMp4";
NSString *filePath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:baseFileName] stringByAppendingPathComponent:vapUrl];
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:filePath]){
vapUrl = filePath;
}
// NSString *baseFileName = @"/GiftMp4";
// NSString *filePath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:baseFileName] stringByAppendingPathComponent:vapUrl];
// NSFileManager *fileManager = [NSFileManager defaultManager];
// if ([fileManager fileExistsAtPath:filePath]){
// vapUrl = filePath;
// }
[self.vapParser parseWithURL:vapUrl completionBlock:^(NSString * _Nullable videoUrl) {
if (videoUrl.length) {
[self.luckyVapGiftEffectView setMute:YES];

View File

@@ -300,6 +300,26 @@
}
break;
default:
{
CGFloat kscale = (CGFloat)124/ (CGFloat)345;
CGFloat width = KScreenWidth - 30;
[self.backImageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(width * kscale);
}];
[self.closeButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(14 * kScreenScale);
}];
[self.sendView mas_updateConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(self.backImageView).offset(-30 * kScreenScale);
}];
nickColor = UIColorFromRGB(0x2F0060);
nickBackImageName = @"room_gift_broadcast_low_normal_nick_bg";
bgImageName = @"room_gift_broadcast_low_bg";
closeImageName = @"room_gift_broadcast_low_close";
boraderImageName = @"room_gift_broadcast_low_avatar_board";
self.roomIdBgView.hidden = YES;
}
break;
}

View File

@@ -45,7 +45,7 @@
- (UILabel *)emptyLabel {
if (!_emptyLabel) {
_emptyLabel = [[UILabel alloc] init];
_emptyLabel.text = YMLocalizedString(@"XPRoomInsideRecommendEmptyCell");
_emptyLabel.text = YMLocalizedString(@"XPRoomInsidekfjdskfjks");
_emptyLabel.font = [UIFont systemFontOfSize:14];
_emptyLabel.textAlignment = NSTextAlignmentCenter;
_emptyLabel.textColor = [UIColor whiteColor];

View File

@@ -192,6 +192,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
- (void)dealloc {
#warning to dox -
NSLog(@"房间销毁了");
[XPSkillCardPlayerManager shareInstance].isInRoomVC = NO;
[XPSkillCardPlayerManager shareInstance].isInRoomFirstRecharge = NO;
[XPSkillCardPlayerManager shareInstance].isInRoom = NO;
[XPSkillCardPlayerManager shareInstance].roomUid = @"";
@@ -213,6 +214,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
return YES;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self exitOldRoom];
@@ -248,9 +250,13 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[super viewWillAppear:animated];
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
}
- (void)viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
[XPSkillCardPlayerManager shareInstance].isInRoomVC = NO;
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[XPSkillCardPlayerManager shareInstance].isInRoomVC = YES;
if([XPSkillCardPlayerManager shareInstance].isInRoomFirstRecharge == YES && self.isShowFirstRecharge == NO){
[XPSkillCardPlayerManager shareInstance].isInRoomFirstRecharge = NO;
///

View File

@@ -70,7 +70,7 @@
///
@property(nonatomic,assign) BOOL isPlayOfB;
///animationListAanimationListBanimationListAanimationListB
@property(nonatomic,assign) BOOL isAnimationListAFinish;
//@property(nonatomic,assign) BOOL isAnimationListAFinish;
@end
@implementation PIFullScreenBannerAnimation
@@ -117,6 +117,11 @@
if (self.animationListA.count > 0) {
[self.animationListA removeObjectAtIndex:0];
}
if(self.animationListB.count > 0){
// self.isAnimationListAFinish = YES;
[self playAnimationWithModel];
return;
}
if (self.animationListA.count > 0 && self.isPlayOfB == NO && self.isPlayOfA == NO) {
[self createGiftBroadcastViewAnimation:self.animationListA.firstObject];
}
@@ -175,7 +180,7 @@
}
-(void)playAnimationWithModel{
if(self.isAnimationListAFinish == YES)return;
// if(self.isAnimationListAFinish == YES)return;
if(self.animationListB.count <= 0){
if(self.animationListA.count > 0 && self.isPlayOfB == NO && self.isPlayOfA == NO){
[self createGiftBroadcastViewAnimation:self.animationListA.firstObject];
@@ -220,7 +225,7 @@
- (void)createBigPrizeAnimation:(PIBaseAnimationViewModel *)prizeModel {
self.isPlayOfB = YES;
CGFloat top = 0 ;
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES){
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES){
top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
}else{
top = self.isPlayOfA == YES ? 225 - kSafeAreaTopHeight : (kSafeAreaTopHeight + 15);
@@ -251,11 +256,11 @@
[self.animationListB removeObjectAtIndex:0];
}
self.isPlayOfB = NO;
if(self.isAnimationListAFinish == YES){
self.isAnimationListAFinish = NO;
[self playAnimationWithModel];
return;
}
// if(self.isAnimationListAFinish == YES){
// self.isAnimationListAFinish = NO;
// [self playAnimationWithModel];
// return;
// }
[self playAnimationWithModel];
}];
@@ -287,7 +292,7 @@
CGFloat kscale = (CGFloat)60 / (CGFloat)375;
self.isPlayOfB = YES;
CGFloat top = 0 ;
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES){
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES){
top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
}else{
top = self.isPlayOfA == YES ? 225 - kSafeAreaTopHeight : (kSafeAreaTopHeight + 15);
@@ -321,12 +326,12 @@
if (self.animationListB.count > 0) {
[self.animationListB removeObjectAtIndex:0];
}
if(self. isAnimationListAFinish == YES){
[self playAnimationWithModel];
self.isAnimationListAFinish = NO;
return;
}
// if(self. isAnimationListAFinish == YES){
//
// [self playAnimationWithModel];
// self.isAnimationListAFinish = NO;
// return;
// }
[self playAnimationWithModel];
}
}];
@@ -350,7 +355,7 @@
- (void)createNobleLevelUpBannerAnimation:(PIBaseAnimationViewModel *)model {
self.isPlayOfB = YES;
CGFloat top = 0 ;
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES){
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES){
top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
}else{
top = self.isPlayOfA == YES ? 225 - kSafeAreaTopHeight : (kSafeAreaTopHeight + 15);
@@ -382,12 +387,12 @@
if (self.animationListB.count > 0) {
[self.animationListB removeObjectAtIndex:0];
}
if(self.isAnimationListAFinish == YES){
[self playAnimationWithModel];
self.isAnimationListAFinish = NO;
return;
}
// if(self.isAnimationListAFinish == YES){
//
// [self playAnimationWithModel];
// self.isAnimationListAFinish = NO;
// return;
// }
[self playAnimationWithModel];
}
}];
@@ -410,7 +415,7 @@
- (void)createStarKitchenBannerAnimation:(PIBaseAnimationViewModel *)attacment{
self.isPlayOfB = YES;
CGFloat top = 0 ;
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES){
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES){
top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
}else{
top = self.isPlayOfA == YES ? 225 - kSafeAreaTopHeight : (kSafeAreaTopHeight + 15);
@@ -445,12 +450,12 @@
if(self.animationListB.count > 0){
[self.animationListB removeObjectAtIndex:0];
}
if(self. isAnimationListAFinish == YES){
[self playAnimationWithModel];
self.isAnimationListAFinish = NO;
return;
}
// if(self. isAnimationListAFinish == YES){
//
// [self playAnimationWithModel];
// self.isAnimationListAFinish = NO;
// return;
// }
[self playAnimationWithModel];
}
}];
@@ -482,7 +487,7 @@
- (void)createLicneseHourRankAnimation:(PIBaseAnimationViewModel *)attachment {
self.isPlayOfB = YES;
CGFloat top = 0 ;
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES){
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES){
top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
}else{
top = self.isPlayOfA == YES ? 225 - kSafeAreaTopHeight : (kSafeAreaTopHeight + 15);
@@ -511,11 +516,11 @@
if(self.animationListB.count > 0){
[self.animationListB removeObjectAtIndex:0];
}
if(self.isAnimationListAFinish == YES){
self.isAnimationListAFinish = NO;
[self playAnimationWithModel];
return;
}
// if(self.isAnimationListAFinish == YES){
// self.isAnimationListAFinish = NO;
// [self playAnimationWithModel];
// return;
// }
[self playAnimationWithModel];
}];
[anchorRankView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
@@ -544,7 +549,7 @@
- (void)createAnchorHourRankAnimation:(PIBaseAnimationViewModel *)attachment {
self.isPlayOfB = YES;
CGFloat top = 0 ;
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES){
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES){
top = self.isPlayOfA == YES ? 240 : (kNavigationHeight + 15);
}else{
top = self.isPlayOfA == YES ? 225 - kSafeAreaTopHeight : (kSafeAreaTopHeight + 15);
@@ -573,11 +578,11 @@
if(self.animationListB.count > 0){
[self.animationListB removeObjectAtIndex:0];
}
if(self.isAnimationListAFinish == YES){
self.isAnimationListAFinish = NO;
[self playAnimationWithModel];
return;
}
// if(self.isAnimationListAFinish == YES){
// self.isAnimationListAFinish = NO;
// [self playAnimationWithModel];
// return;
// }
[self playAnimationWithModel];
}];
[anchorRankView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];

View File

@@ -561,13 +561,13 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
}
}else if(attachment.first == CustomMessageType_LuckyBag && attachment.second == Custom_Message_Sub_Room_Gift_LuckBag_FullScree){
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES)return;
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveLuckyGiftBigPrize:attachment];
}else if(attachment.first == CustomMessageType_Graffiti_Star_Kitchen && attachment.second == Custom_Message_Sub_Star_Kitchen_FullScreen){
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES)return;
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveRoomGraffitiStarKitchen:attachment];
}else if(attachment.first == CustomMessageType_Look_Love && attachment.second == Custom_Message_Sub_Look_Love_InRoom_NeedAllMicSend){
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES)return;
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveCandyTreeGiftHighLevle:attachment];
}
}
@@ -878,7 +878,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
- (void)receiveBroadcastGift:(AttachmentModel *)attachment {
GiftReceiveInfoModel *giftNotifyInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
if (!giftNotifyInfo.ceremonyGift && giftNotifyInfo.isHomeShow == YES) {
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES)return;
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveGift:giftNotifyInfo];
return;
}

View File

@@ -20,6 +20,9 @@
@property (nonatomic,assign) BOOL isInRoomFirstRecharge;
///是否在房间
@property (nonatomic,assign) BOOL isInRoom;
///是否在房间控制器里,用于播放动画的判断
@property (nonatomic,assign) BOOL isInRoomVC;
///是否在首充不弹出界面
///所在房间的id
@property (nonatomic,copy) NSString *roomUid;

View File

@@ -2073,7 +2073,7 @@
"MvpViewController6" = "您被封号了";
"MvpViewController7" = "您的账号因%@被封禁\n解封时间%@";
"XPRoomInsideRecommendEmptyCell" = "努力寻找合适房间中~";
"XPRoomInsidekfjdskfjks" = "努力寻找合适房间中~";
"XPChooseRreaCodeVC0"="选择区号";

View File

@@ -2075,7 +2075,7 @@
"MvpViewController6" = "您被封號了";
"MvpViewController7" = "您的賬號因%@被封禁\n解封時間%@";
"XPRoomInsideRecommendEmptyCell" = "努力尋找合適房間中~";
"XPRoomInsidekfjdskfjks" = "努力尋找合適房間中~";
"XPChooseRreaCodeVC0"="選擇區號";