把礼物动画从舞台的view中移出来 单一职责

This commit is contained in:
fengshuo
2021-12-06 20:28:06 +08:00
parent f393b685c3
commit d6dc4e6e23
24 changed files with 918 additions and 842 deletions

View File

@@ -26,6 +26,7 @@
#import "RoomHeaderView.h"
#import "SocialStageView.h"
#import "XPMiniRoomView.h"
#import "XPRoomAnimationView.h"
///P
#import "XPRoomPresenter.h"
#import "XPRoomProtocol.h"
@@ -46,7 +47,8 @@
@property (nonatomic,strong) XPRoomMenuContainerView *menuContainerView;
///
@property (nonatomic,strong) XPRoomActivityContainerView *activityContainerView;
///view
@property (nonatomic,strong) XPRoomAnimationView *animationView;
///Uid
@property (nonatomic,copy) NSString * roomUid;
///
@@ -95,10 +97,6 @@
[self.view endEditing:YES];
}
- (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews];
[self.backContainerView superViewDidLayoutViews];
}
#pragma mark - Private Method
- (void)initSubViews {
@@ -108,6 +106,7 @@
[self.view addSubview:self.messageContainerView];
[self.view addSubview:self.menuContainerView];
[self.view addSubview:self.activityContainerView];
[self.view addSubview:self.animationView];
}
- (void)initSubViewConstraints {
@@ -144,6 +143,10 @@
make.bottom.mas_equalTo(self.menuContainerView.mas_top).offset(-5);
make.width.mas_equalTo(80);
}];
[self.animationView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
}
- (void)exitOldRoom {
@@ -213,6 +216,9 @@
[self enterRoomFail];
}
- (CGPoint)centerForUserAtUid:(NSString *)uid {
return [self.stageView centerForUserAtUid:uid];
}
#pragma mark - RoomDelegate
- (RoomInfoModel *)getRoomInfo {
@@ -289,4 +295,11 @@
return _activityContainerView;
}
- (XPRoomAnimationView *)animationView {
if (!_animationView) {
_animationView = [[XPRoomAnimationView alloc] initWithdelegate:self];
}
return _animationView;
}
@end